-
Notifications
You must be signed in to change notification settings - Fork 18
chore(deps): bump github/codeql-action from 4 to 4.37.1 #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ jobs: | |
| submodules: recursive | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| uses: github/codeql-action/init@v4.37.1 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| config: | | ||
|
|
@@ -49,6 +49,6 @@ jobs: | |
| - 'scripts/**' | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4 | ||
| uses: github/codeql-action/analyze@v4.37.1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified an issue in your code:
More details about this
A plausible attack looks like this:
Because To resolve this comment: ✨ Commit fix suggestion
💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag. 🛟 Help? Slack #semgrep-help or go/semgrep-help. Resolution Options:
You can view more details about this finding in the Semgrep AppSec Platform. |
||
| with: | ||
| category: "/language:${{matrix.language}}" | ||
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:
github/codeql-action/init@v4.37.1uses a mutable tag, so a retagged release could make this workflow run attacker-controlled code.More details about this
github/codeql-action/initis referenced by the mutable tagv4.37.1in the Initialize CodeQL step instead of a specific commit. If the owner ofgithub/codeql-actionor anyone who compromises that repository retagsv4.37.1, this workflow will run different code onubuntu-latestwith this job'scontents: readandsecurity-events: writepermissions.A plausible attack looks like this:
github/codeql-actionrepository or its release process.v4.37.1tag sogithub/codeql-action/init@v4.37.1points to a new malicious commit.main, on the weeklyschedule, or viaworkflow_dispatch, the Initialize CodeQL step fetches and executes the attacker's code.analyzejob and can read the checked-out repository from the earlieractions/checkout@v6step.contents: readandsecurity-events: write, for example by exfiltrating repository contents or uploading fake CodeQL results to hide real problems.To resolve this comment:
✨ Commit fix suggestion
Replace the mutable action reference with a full 40-character commit SHA in the
usesline for this step.Change
github/codeql-action/init@v4.37.1togithub/codeql-action/init@<40-character-commit-sha>.Keep the current version as a comment after the SHA so the pinned release is still clear.
For example:
uses: github/codeql-action/init@<40-character-commit-sha> # v4.37.1Pin the matching CodeQL analyze step to a full commit SHA as well, so both CodeQL steps use immutable references.
Change
github/codeql-action/analyze@v4.37.1togithub/codeql-action/analyze@<40-character-commit-sha> # v4.37.1Use the commit SHA published for the
v4.37.1release ofgithub/codeql-action, rather than a branch or tag name. This prevents the referenced code from changing without a workflow change.Alternatively, if you intentionally want to upgrade CodeQL at the same time, pin both steps to the new release’s commit SHA and update the trailing version comment to match.
💬 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.
🛟 Help? Slack #semgrep-help or go/semgrep-help.
Resolution Options:
/fp $reason(if security gap doesn’t exist)/ar $reason(if gap is valid but intentional; add mitigations/monitoring)/other $reason(e.g., test-only)You can view more details about this finding in the Semgrep AppSec Platform.