Skip to content

chore(ci): bump actions/setup-go from 5 to 6#63

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

chore(ci): bump actions/setup-go from 5 to 6#63
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/github_actions/actions/setup-go-6

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 25, 2026

Bumps actions/setup-go from 5 to 6.

Release notes

Sourced from actions/setup-go's releases.

v6.0.0

What's Changed

Breaking Changes

Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. See Release Notes

Dependency Upgrades

New Contributors

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

v5.6.0

What's Changed

Full Changelog: actions/setup-go@v5...v5.6.0

v5.5.0

What's Changed

Bug fixes:

Dependency updates:

New Contributors

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

... (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)

Summary by CodeRabbit

  • Chores
    • Updated CI/build pipeline infrastructure dependencies to latest supported versions.

Review Change Stack

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

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github May 25, 2026

Labels

The following labels could not be found: ci, dependencies. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependabot[bot] has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

The CI workflow is updated to use version 6 of the actions/setup-go GitHub Action in both the build and contract-tests jobs, replacing the previous version 5 while maintaining the existing Go version and cache configuration.

Changes

CI Dependency Upgrade

Layer / File(s) Summary
Setup Go action version upgrade
.github/workflows/ci.yml
The actions/setup-go action is bumped from @v5 to @v6 in the build job (line 57) and the contract-tests job (line 150), with Go version 1.25.10 and caching configuration remaining unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A rabbit hops through workflows with glee,
Updates the Go setup from five to three... er, six!
One tiny tweak in two places so neat,
Version bumps make the CI complete! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete. It includes release notes and changelog details but lacks the required PR template structure with sections like Description, Related Issue, Type of Change, and completion of the mandatory Security Checklist. Complete the PR description using the provided template: add a summary section explaining the rationale, mark the Type of Change checkbox, and complete all mandatory security checklist items confirming CI passes and no hardcoded secrets.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely and accurately summarizes the main change: bumping the actions/setup-go GitHub Action version from 5 to 6.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dependabot/github_actions/actions/setup-go-6

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

59-60: ⚡ Quick win

Lower risk: add explicit trust gating (or document why cache writes can’t happen) for setup-go caching

actions/setup-go@v6 is configured with cache-dependency-path: go.sum in .github/workflows/ci.yml for both steps (around lines 56-60 and 150-153) but there’s no PR trust-boundary guard. Fork pull_request runs get a read-only GITHUB_TOKEN, so cache poisoning via cache writes is generally blocked; however this workflow grants only permissions: contents: read and no actions permission, so cache restore/save behavior is constrained. Add explicit gating (e.g., disable cache on pull_request) or adjust permissions to make the intended behavior unambiguous.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 59 - 60, The workflow currently uses
actions/setup-go@v6 with cache-dependency-path: go.sum but lacks a trust gate
for pull_request; update .github/workflows/ci.yml to either disable cache writes
on pull_request (e.g., gate the steps using an if condition for
github.event_name != 'pull_request') or explicitly set/clarify permissions
(e.g., add permissions: actions: write only for trusted branches) so cache
restore/save behavior is unambiguous; target the setup-go step(s) that reference
cache-dependency-path and the workflow-level permissions: contents: read setting
when applying the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 57: Replace the mutable reference uses: actions/setup-go@v6 with a pinned
immutable commit SHA in both the build and contract-tests jobs (locate the
occurrences of "uses: actions/setup-go@v6" and update them to "uses:
actions/setup-go@<COMMIT_SHA>"); ensure both job entries are updated
consistently, and verify the chosen commit SHA corresponds to the desired
actions/setup-go release tag before committing.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 59-60: The workflow currently uses actions/setup-go@v6 with
cache-dependency-path: go.sum but lacks a trust gate for pull_request; update
.github/workflows/ci.yml to either disable cache writes on pull_request (e.g.,
gate the steps using an if condition for github.event_name != 'pull_request') or
explicitly set/clarify permissions (e.g., add permissions: actions: write only
for trusted branches) so cache restore/save behavior is unambiguous; target the
setup-go step(s) that reference cache-dependency-path and the workflow-level
permissions: contents: read setting when applying the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b2608d9-4e9b-46bd-8a64-bd74998d8029

📥 Commits

Reviewing files that changed from the base of the PR and between e9d472a and 5b8cb64.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Comment thread .github/workflows/ci.yml

- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify all action refs and detect non-SHA pins in workflows.
# Expected: no `uses:` entries pinned only by tag/version.
rg -nP '^\s*uses:\s*[^@]+@([vV]?\d+(\.\d+){0,2}|main|master)$' .github/workflows || true

# Show all setup-go uses with context.
rg -n -C2 'actions/setup-go@' .github/workflows

Repository: AIX-Format/PiWorker-OS

Length of output: 1785


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact setup-go blocks for both occurrences.
nl -ba .github/workflows/ci.yml | sed -n '45,75p'
echo "----"
nl -ba .github/workflows/ci.yml | sed -n '135,165p'

Repository: AIX-Format/PiWorker-OS

Length of output: 109


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "---- setup-go @ first occurrence (approx 45-75) ----"
cat -n .github/workflows/ci.yml | sed -n '45,75p'
echo "---- setup-go @ second occurrence (approx 135-165) ----"
cat -n .github/workflows/ci.yml | sed -n '135,165p'

Repository: AIX-Format/PiWorker-OS

Length of output: 2075


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show workflow triggers and relevant job context around the setup-go steps.
cat -n .github/workflows/ci.yml | sed -n '1,120p'
echo "----"
cat -n .github/workflows/ci.yml | sed -n '120,220p'

Repository: AIX-Format/PiWorker-OS

Length of output: 5432


🌐 Web query:

actions/setup-go cache-dependency-path cache poisoning pull_request from forks write to cache

💡 Result:

Summary: In GitHub Actions, cache poisoning becomes practical when untrusted code (e.g., from a forked PR) can write to the same cache entries that a more-privileged workflow later restores. Two key pieces matter for your query (setup-go + pull_request from forks + write to cache). 1) What actions/setup-go does with cache-dependency-path - actions/setup-go has built-in caching for “Go modules and build outputs”. Caching is enabled by default via its cache input; you can disable it with cache: false.[1] - The cache key includes hashes of dependency files. By default, it looks for go.mod and uses its hash as part of the cache key; to use go.sum (or other files), set cache-dependency-path (supports glob patterns).[1] 2) Whether forked pull_request workflows can write to caches used elsewhere - GitHub Docs warn not to store sensitive information in caches because “Anyone with read access can create a pull request on a repository and access the contents of a cache” and “forks of a repository can create pull requests on the base branch and access caches on the base branch.”[2] - GitHub Docs also describe cache scope behavior specifically for PRs: when a workflow run is triggered for a pull request, the cache is created for the merge ref (refs/pull/.../merge), so it “can only be restored by re-runs of the pull request” and “cannot be restored by the base branch or other pull requests targeting that base branch.”[2] - Implication: with the normal pull_request event (and the typical security model), PR-created caches should not be a simple “write once, poison later in main” channel, because of that limited scope.[2] 3) The main way “write to cache from forks” becomes dangerous: pull_request_target - The practical “poison the cache for a later trusted run” pattern appears when workflows are triggered with pull_request_target, because it runs in the context of the base repository (so the attacker’s code can execute with base-repo permissions, including the ability to interact with cache). This is described in the TanStack cache poisoning write-up: the attack used pull_request_target instead of pull_request, noting that it runs in the context of the base repository and “can access secrets and can write to the Actions cache — even from a forked PR.”[3] 4) Mitigations that follow from the above (what to do for setup-go caching) - Security conservative mitigation: disable setup-go caching in workflows that may execute untrusted code (especially anything resembling pull_request_target). This is explicitly recommended/implemented in a GitHub change: “disable Go module cache in agentic setup actions to prevent cache poisoning”, changing actions/setup-go usage to set cache: false (because caching enabled by default exposes a cache poisoning vector).[4] - If you need caching, isolate by context: GitHub’s cache poisoning guidance emphasizes preventing untrusted PR workflows from writing to caches used by privileged/release pipelines; one key rule is to “separate caches” so PR workflows cannot overwrite what release workflows will restore.[5] - Use restore-only patterns when appropriate: actions/cache provides actions/cache/restore that restores but does not save (so it’s “granular ability to restore a cache without having to save it”).[6] (Separating restore and save reduces write capability from untrusted contexts.) Concrete answer to your query terms - cache-dependency-path: controls what dependency file(s) are hashed for the setup-go cache key (default uses go.mod hash; you can point it at go.sum via cache-dependency-path).[1] - pull_request from forks write to cache: under normal pull_request scope rules, PR-created caches are tied to refs/pull/.../merge and aren’t restorable by base branch or other PRs, so “write to cache then have main restore it” is not straightforward.[2] - However, with pull_request_target (base repo context), forked PR code can gain access that enables cache poisoning/write scenarios.[3] Recommended workflow guidance (short) - For workflows that may run untrusted PR code (particularly anything using pull_request_target), set cache: false on actions/setup-go.[4][1] - For trusted workflows (main/release), you can keep caching enabled, but ensure untrusted workflows never have permission or execution context that allows them to save/poison the same cache keys that trusted workflows restore.[5][3]

Citations:


Pin actions/setup-go to an immutable commit SHA (mutable @v6 in two steps).

uses: actions/setup-go@v6 is a mutable reference and weakens CI supply-chain integrity; pin to a full commit SHA in both the build and contract-tests jobs.

Suggested hardening diff
-        uses: actions/setup-go@v6
+        uses: actions/setup-go@<full-length-commit-sha-for-v6>
...
-        uses: actions/setup-go@v6
+        uses: actions/setup-go@<full-length-commit-sha-for-v6>
  • Workflow runs on pull_request (not pull_request_target), so cross-branch cache poisoning is less straightforward; if your policy treats PR caches as untrusted, consider setting cache: false for pull_request.
🧰 Tools
🪛 zizmor (1.25.2)

[error] 57-57: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 57-57: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default

(cache-poisoning)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 57, Replace the mutable reference uses:
actions/setup-go@v6 with a pinned immutable commit SHA in both the build and
contract-tests jobs (locate the occurrences of "uses: actions/setup-go@v6" and
update them to "uses: actions/setup-go@<COMMIT_SHA>"); ensure both job entries
are updated consistently, and verify the chosen commit SHA corresponds to the
desired actions/setup-go release tag before committing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants