Skip to content

Bump actions/setup-go from 6 to 7#35

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/setup-go-7
Open

Bump actions/setup-go from 6 to 7#35
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/setup-go-7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 16, 2026

Copy link
Copy Markdown
Contributor

Bumps actions/setup-go from 6 to 7.

Release notes

Sourced from actions/setup-go's releases.

v7.0.0

What's Changed

New Contributors

Full Changelog: actions/setup-go@v6...v7.0.0

v6.5.0

What's Changed

Dependency update

New Contributors

Full Changelog: actions/setup-go@v6...v6.5.0

v6.4.0

What's Changed

Enhancement

Dependency update

Documentation update

New Contributors

Full Changelog: actions/setup-go@v6...v6.4.0

v6.3.0

What's Changed

Full Changelog: actions/setup-go@v6...v6.3.0

v6.2.0

What's Changed

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6 to 7.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jul 16, 2026
Comment thread .github/workflows/ci.yaml
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
- uses: actions/setup-go@v7

Copy link
Copy Markdown

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:

actions/setup-go@v7 uses a mutable tag, so this CI job may run different action code later if v7 is repointed.

More details about this

actions/setup-go@v7 pulls the action by a mutable tag, not a specific commit. If the v7 tag is ever moved to a different commit, this unit-test job will run whatever code that new action version contains before ./scripts/check/unit-test.sh executes.

A plausible attack looks like this:

  1. An attacker gains the ability to publish a new commit under the actions/setup-go repository or repoint the v7 tag.
  2. On the next workflow run, the step uses: actions/setup-go@v7 fetches and runs that attacker-controlled commit.
  3. That action runs inside your GitHub Actions job, where it can read the checked-out repository, inspect workflow inputs, and access job data before your tests start.
  4. The malicious action could modify the Go toolchain setup, alter files used by ./scripts/check/unit-test.sh, or exfiltrate values available to the job to an external server.

Because this workflow trusts v7 by name, the code that runs in CI can change without any change to this repository.

To resolve this comment:

✨ Commit fix suggestion
  1. Replace the mutable action tag in the workflow step with a full 40-character commit SHA.
    Change uses: actions/setup-go@v7 to uses: actions/setup-go@<full-commit-sha> # v7.

  2. Pin the SHA to the exact release you intend to use by looking up the commit for the current v7 release in the actions/setup-go repository.
    The uses: value should look like actions/setup-go@0123456789abcdef0123456789abcdef01234567 # v7.

  3. Keep the version as an inline comment after the SHA so future updates are easier to review.
    Pinning to a commit SHA prevents the action owner from silently moving the tag to different code later.

  4. Apply the same fix to the other third-party action references in this workflow that still use tags, such as actions/checkout@v4 and codecov/codecov-action@v5, by replacing each tag with its corresponding full commit SHA.

💬 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 reasons

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:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants