-
Notifications
You must be signed in to change notification settings - Fork 937
Bump the actions group with 2 updates #2519
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
base: master
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -41,7 +41,7 @@ jobs: | |
| go-version: "1.25.0" | ||
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4.37.2 #immutable | ||
| uses: github/codeql-action/init@v4.37.3 #immutable | ||
| with: | ||
| languages: go | ||
| build-mode: manual | ||
|
|
@@ -54,6 +54,6 @@ jobs: | |
|
|
||
| go test -v ./internal/test/compilecheck -run '^TestCompileCheck/go:1\.19$' | ||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4.37.2 #immutable | ||
| uses: github/codeql-action/analyze@v4.37.3 #immutable | ||
|
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 the reference here is mutable, the code executed in CI can change without any change to this repository. 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:go" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ jobs: | |
| with: | ||
| persist-credentials: false | ||
| - name: "Run analysis" | ||
| uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 | ||
| uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 | ||
| with: | ||
| results_file: results.sarif | ||
| results_format: sarif | ||
|
|
@@ -66,6 +66,6 @@ jobs: | |
| # Upload the results to GitHub's code scanning dashboard (optional). | ||
| # Commenting out will disable upload of results to your repo's Code Scanning dashboard | ||
| - name: "Upload to code-scanning" | ||
| uses: github/codeql-action/upload-sarif@v4.37.2 #immutable | ||
| uses: github/codeql-action/upload-sarif@v4.37.3 #immutable | ||
|
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:
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: results.sarif | ||
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.3uses a movable ref, so repointing that tag could make this workflow run attacker-controlled action code.More details about this
github/codeql-action/initis pulled with the tagv4.37.3instead of a full 40-character commit SHA. If thev4.37.3ref is ever repointed upstream, thisInitialize CodeQLstep would run different code in your workflow with this job'scontents: readandsecurity-events: writepermissions.A plausible attack looks like this:
github/codeql-actionrelease process or gains permission to move thev4.37.3ref.github/codeql-action/init@v4.37.3to a malicious commit that still looks like a normal CodeQL init step.analyzejob runs onmaster,release/*,feature/*, or the weekly schedule, GitHub downloads and executes that new action code in theInitialize CodeQLstep.security-events: writeaccess to tamper with CodeQL results or hide real findings before thePerform CodeQL Analysisstep runs.To resolve this comment:
✨ Commit fix suggestion
Replace the mutable action reference
github/codeql-action/init@v4.37.3with a full 40-character commit SHA for that exact release, and keep the readable version as a trailing comment, for exampleuses: github/codeql-action/init@<40-char-sha> # v4.37.3.Update the matching CodeQL step references in the same workflow to use the same pinning style, such as
github/codeql-action/analyze@<40-char-sha> # v4.37.3, so every third-party action is locked to an immutable revision.Add a short comment near these steps explaining that actions are pinned to full commit SHAs because tags like
v4.37.3can be moved to different code later. This prevents unreviewed upstream changes from being pulled into the workflow without a code change in this repository.Get the correct SHA from the action’s release page or repository for
v4.37.3, and make sure the SHA belongs to the exact version you intend to use.Alternatively, if you must keep a version label visible for maintenance, keep the SHA in
uses:and put the version only in a comment like# v4.37.3, not in the action reference itself.💬 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.