A CI step that echoes a token is one line of YAML. It passes review because the build is green and nobody reads the console output.
This is the pattern:
- name: Debug deploy
run: echo "${{ secrets.DEPLOY_KEY }}"
What to check in every workflow file:
- Any echo or printenv line that references secrets.
- Debug steps that print the whole environment.
- Logging of request headers or config objects that hold a token.
- Passing a token on stdin where the tool supports it, like --password-stdin, so it never appears in the command line.
Zelsis flags the first pattern as CICD-SEC-05 (Exposed Secret Tokens in Build Log Outputs) on the exact line of the workflow file, during the pull request, before merge.
A static check cannot know what a command prints at runtime. Treat it as the first filter. If a token has ever appeared in a log, rotate it, even if the log was private.
How do you find these in CI today?
Top comments (0)