Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
The coverage job executes
codecov/codecov-action@v7, a mutable tag that can be silently repointed to attacker-controlled code. A compromised action could read repository data and CI credentials from the runner and exfiltrate them.More details about this
The
checkjob runscodecov/codecov-action@v7in theUpload to codecov.iostep. Becausev7is a mutable tag, the action owner—or an attacker who compromises that repository—could repoint it after this workflow is reviewed, causing future runs to execute attacker-controlled code onubuntu-latest.A plausible attack would be:
codecov/codecov-actionrepository or itsv7tag and changes the action code.checkjob, which runs the repointed action after the profiling tests andgrcovcreatetarget/debug/coverage/lcov.target/debug/coverage/lcov, repository files, and any credentials or tokens available to the job, then sends them to an attacker-controlled server—for example, by issuing an outbound request from the runner.actions/checkout@v3,dtolnay/rust-toolchain@nightly, andSwatinem/rust-cache@v2.To resolve this comment:
✨ Commit fix suggestion
codecov/codecov-actionrelease:uses: codecov/codecov-action@<40-character-commit-SHA>codecov/codecov-actionrepository and corresponds to the version currently intended by@v7.with.filesconfiguration unchanged. Pinning the SHA prevents the action reference from silently changing if the tag is moved.💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
You can view more details about this finding in the Semgrep AppSec Platform.