Skip to content

fix: move secrets to env blocks, remove env dump, pin actions [E-1815]#9

Merged
jonathansantilli merged 1 commit intomainfrom
action/E-1815
Apr 8, 2026
Merged

fix: move secrets to env blocks, remove env dump, pin actions [E-1815]#9
jonathansantilli merged 1 commit intomainfrom
action/E-1815

Conversation

@jonathansantilli
Copy link
Copy Markdown
Collaborator

@jonathansantilli jonathansantilli commented Apr 7, 2026

Summary

  • Move cx-api-token from command line argument to env var (was visible in process table)
  • Move github-token from curl command line to env var
  • Move all ${{ inputs.* }} from run: blocks to env: blocks
  • Remove bare env command that dumped all secrets to workflow logs
  • Replace bash -l {0} with bash
  • Quote all variable expansions
  • Pin all action references to immutable commit SHAs

Security Context

Line 71 (./cx configure set --prop-name cx_apikey --prop-value ${{ inputs.cx-api-token }}) places the Checkmarx API key directly on the command line, where it is visible in process listings. Line 74 (env) dumps all environment variables (potentially including secrets) to the workflow log.

The fix passes all secrets through env: blocks and removes the env debug command.

Consumer Impact

None. The action inputs: and outputs: are unchanged. This fix is transparent to all consumers.

Test plan

The injection test evidence is documented in detail at: mobb-dev/action#31 (comment)

Security fix for secret exposure and hardening (CWE-78).

Changes:
- Move cx-api-token from command line to env var (was visible in process table)
- Move github-token from curl command line to env var
- Move all ${{ inputs.* }} from run: blocks to env: blocks
- Remove bare `env` command that dumped all secrets to logs
- Replace bash -l {0} with bash
- Quote all variable expansions
- Pin all action references to immutable commit SHAs:
  - actions/setup-node v3.6.0 -> v4.4.0 (SHA pinned)
  - actions/checkout v3 -> v4.3.1 (SHA pinned)
  - guibranco/github-status-action-v2 v1.1.13 (SHA pinned)

The action interface (inputs/outputs) is unchanged — this fix is
transparent to consumers.

Ref: E-1815
@jonathansantilli jonathansantilli merged commit 6e7b6e8 into main Apr 8, 2026
@jonathansantilli jonathansantilli deleted the action/E-1815 branch April 8, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants