fix: remove eval, stop printing secrets to logs, pin actions [E-1815]#2
Merged
jonathansantilli merged 1 commit intomainfrom Apr 8, 2026
Merged
fix: remove eval, stop printing secrets to logs, pin actions [E-1815]#2jonathansantilli merged 1 commit intomainfrom
jonathansantilli merged 1 commit intomainfrom
Conversation
Security fix for secret leakage and command injection (CWE-78).
Changes:
- Remove eval "$python_cmd" — call python directly with env vars
- Remove echo "$python_cmd" that printed SONARQUBE_TOKEN to logs
- Remove bare `env` command that dumped all secrets to logs
- Move all ${{ inputs.* }} from run: blocks to env: blocks
- Move github-token from curl command line to env var
- 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 python script (.github/scripts/sonarqube_download_report.py) already
reads from os.environ — no changes needed to consumer scripts.
The action interface (inputs/outputs) is unchanged — this fix is
transparent to consumers.
Ref: E-1815
Kirill89
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eval "$python_cmd"— call python directly with env varsecho "$python_cmd"that printedSONARQUBE_TOKENin plaintext to workflow logsenvcommand that dumped all environment variables to logs${{ inputs.* }}fromrun:blocks toenv:blocksgithub-tokenfrom curl command line to env varbash -l {0}withbashSecurity Context
Line 94 (
echo "$python_cmd") prints a string containingSONARQUBE_TOKEN=<actual-token>to the workflow log every time the action runs. On public repos, anyone can read Actions logs.The consumer
.github/scripts/sonarqube_download_report.pyalready reads fromos.environ— the fix simply sets the env vars via theenv:block instead of viaevalinline assignment. No changes needed to the python script.Consumer Impact
None. The action
inputs:andoutputs:are unchanged. The python script receives the same environment variables. This fix is transparent.Test plan
The injection test evidence is documented in detail at: mobb-dev/action#31 (comment)