-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Bump github/codeql-action from 4 to 4.37.3 #3561
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 |
|---|---|---|
|
|
@@ -88,13 +88,13 @@ jobs: | |
|
|
||
| - name: Upload SARIF report | ||
| if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| uses: github/codeql-action/upload-sarif@v4 | ||
| uses: github/codeql-action/upload-sarif@v4.37.3 | ||
| with: | ||
| sarif_file: phpstan.sarif | ||
|
|
||
| - name: Upload SARIF report | ||
| if: ${{ github.event_name == 'workflow_dispatch' }} | ||
| uses: github/codeql-action/upload-sarif@v4 | ||
| uses: github/codeql-action/upload-sarif@v4.37.3 | ||
|
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: The More details about this
A plausible attack looks like this:
Because the reference is mutable, the code executed here can change later without any change to this workflow file. 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: | ||
| sarif_file: phpstan.sarif | ||
| ref: ${{ inputs.ref }} | ||
|
|
||
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/upload-sarif@v4.37.3uses a mutable tag, so the action owner or an attacker who compromises that repo could silently swap in different code. That code would run during the SARIF upload step with your CI job’s access to the workspace, token, and workflow data.More details about this
github/codeql-action/upload-sarif@v4.37.3is pulled by a version tag, not an exact commit, in the Upload SARIF report step. If the owner ofgithub/codeql-actionor anyone who compromises that repository repointsv4.37.3to different code, this workflow will run the new action code with this job’s permissions when it uploadsphpstan.sarif.A plausible attack looks like this:
github/codeql-actionrepository or its release process.v4.37.3tag souses: github/codeql-action/upload-sarif@v4.37.3now resolves to attacker-controlled code.composer installand./vendor/bin/phpstan analyse ... > phpstan.sarifhave already run, so the malicious action executes inside your CI job.phpstan.sarif, inspect environment variables, and use the job’s GitHub token or other available secrets to make API calls.workflow_dispatchpath, it also receivesref: ${{ inputs.ref }}andsha: ${{ env.CHECKED_OUT_SHA }}, which gives the attacker extra context about what commit is being analyzed while they exfiltrate data or tamper with results.Because the reference is mutable, the code that runs in CI can change silently without any workflow diff in your repository.
To resolve this comment:
✨ Commit fix suggestion
uses:line.uses: github/codeql-action/upload-sarif@<full-40-char-sha> # v4.37.3.github/codeql-actionrepository release or tag page forv4.37.3, and use that exact commit instead of the version tag. Pinning to a commit prevents the action owner from silently changing what runs for the same tag.💬 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.