Skip to content

A Github action that ensures repository_dispatch parameters are not displayed in the output

License

Notifications You must be signed in to change notification settings

cultureamp/protect-event-parameters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protect-event-parameters

A Github action that ensures repository_dispatch event parameters are not shown in Github actions build output. These parameters are the contents of the client_payload field from the event.

Usage

Inputs

allowlist

Optional A comma-separated list of parameters that should be ignored by this action. This allows non-secret fields to be excluded from protection.

Example usage

uses: cultureamp/protect-event-parameters@v2
with:
  allowlist: 'field1,field2'

Given a client_payload that contains field_1, field_2 and field_3, after this action runs the value supplied in field_3 will be masked from all log outputs (using the appropriate workflow commands).

Building

Note that the compiled output is committed to the repo, as required by GH actions.

# download dependencies
pnpm install --frozen-lockfile

# packs result
pnpm run build

The build uses @vercel/ncc to compile dependencies into one file, rather than requiring node_modules to be committed.

About

A Github action that ensures repository_dispatch parameters are not displayed in the output

Resources

License

Stars

Watchers

Forks

Packages

No packages published