Uh oh!
There was an error while loading. Please reload this page.
Fixing build to build binary - #36
Conversation
📝 WalkthroughWalkthroughThe build-release workflow is updated to enable full git history during checkout and migrate from ChangesRelease Workflow Migration to GoReleaser
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/build-release.yaml (1)
15-18: 💤 Low valueConsider disabling credential persistence in checkout.
The checkout step does not set
persist-credentials: false, which means GitHub token credentials will persist in the git configuration after checkout. This increases the attack surface if subsequent steps or artifacts are compromised.🛡️ Proposed fix
- name: Repo checkout uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: falseNote: This may require passing
GITHUB_TOKENexplicitly to the tag-bump step if it needs push permissions. Verify that the workflow still functions correctly after this change.🤖 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/build-release.yaml around lines 15 - 18, Update the GitHub Actions checkout step to disable credential persistence by adding persist-credentials: false to the actions/checkout@v4 step (the "Repo checkout" job step), then ensure any downstream steps that need to push (e.g., tag-bump) are given an explicit GITHUB_TOKEN or appropriate token via with: or env: so they retain push permissions after checkout credentials are disabled.Source: Linters/SAST tools
🤖 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/build-release.yaml:
- Around line 32-41: Replace the movable tag for the GoReleaser action so it
uses the pinned commit SHA (change uses: goreleaser/goreleaser-action@v6 to
goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a) and keep
the same inputs/env; also verify the step with id "bump" (the
mathieudutour/github-tag-action@v6.2 invocation) actually exposes an output
named new_tag and either change steps.bump.outputs.new_tag to the correct output
key if different or modify the tag-action call to set/output new_tag accordingly
so GORELEASER_CURRENT_TAG receives the intended value.
- Around line 27-31: Update the workflow to use the newer actions/setup-go@v5
and replace mutable action tags with pinned commit SHAs for each action
referenced (actions/setup-go, actions/checkout, mathieudutour/github-tag-action,
goreleaser/goreleaser-action) so the release job uses immutable refs;
specifically change the actions/setup-go reference to the v5 commit SHA and pin
the other actions to their respective commit SHAs, and if you rely on
actions/setup-go caching, add or document cache-key safety/poisoning mitigations
for untrusted fork/PR runs.
---
Nitpick comments:
In @.github/workflows/build-release.yaml:
- Around line 15-18: Update the GitHub Actions checkout step to disable
credential persistence by adding persist-credentials: false to the
actions/checkout@v4 step (the "Repo checkout" job step), then ensure any
downstream steps that need to push (e.g., tag-bump) are given an explicit
GITHUB_TOKEN or appropriate token via with: or env: so they retain push
permissions after checkout credentials are disabled.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1e569acc-358d-44f7-ad92-6668527939fe
📒 Files selected for processing (1)
.github/workflows/build-release.yaml
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary by CodeRabbit