fix: downgrade gosec to v2.27.1 to resolve actionlint yaml/v4 compile failure - #48979
Conversation
gosec/v2@v2.28.0 required go.yaml.in/yaml/v4@v4.0.0-rc.6, which is incompatible with actionlint@v1.7.12 (needs rc.3). MVS selected rc.6, causing actionlint to fail to compile with missing yaml.ParserError type and undefined Err/Error fields. Downgrade gosec to v2.27.1 (which uses only yaml/v3) and pin go.yaml.in/yaml/v4 to v4.0.0-rc.3 to restore actionlint compatibility. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. Thanks for working on fixing the actionlint compilation issue (#48971)! 🎯 This PR is still in progress ([WIP]) with no actual code changes committed yet. Here are some things to complete before it's ready for review:
Once these changes are pushed and verified, this should be ready for review. Great work tackling this dependency resolution issue!
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
|
✅ Test Quality Sentinel completed test quality analysis. Warning threat detection engine error DetailsThe threat detection engine failed to produce results. Review the workflow run logs for details. No test files were added or modified in this PR. Test Quality Sentinel skipped. |
There was a problem hiding this comment.
Pull request overview
Resolves the actionlint/YAML incompatibility by adjusting tool dependencies.
Changes:
- Downgrades gosec to v2.27.1.
- Pins YAML v4 to rc.3 and refreshes checksums.
Show a summary per file
| File | Description |
|---|---|
go.mod |
Adjusts gosec and YAML versions. |
go.sum |
Updates dependency checksums. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/4 changed files
- Comments generated: 1
- Review effort level: Medium
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/robfig/cron/v3 v3.0.1 // indirect | ||
| github.com/securego/gosec/v2 v2.28.0 // indirect | ||
| github.com/securego/gosec/v2 v2.27.1 // indirect |
|
✅ PR Code Quality Reviewer completed the code quality review. |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs — requesting changes for one blocking issue.
📋 Key Themes & Highlights
Blocking Issue
- Binary executables committed:
actionlintandgosecbinary files were accidentally committed to the repository root (likely local debugging artifacts). These must be removed before merge.
Positive Highlights
- ✅ Root cause clearly identified and well-documented in the PR description
- ✅ Two-pronged fix (downgrade gosec + pin yaml/v4) is the minimal correct resolution
- ✅
go.sumentries are consistent with the version changes
The go.mod/go.sum changes look correct. Please remove the binary files (actionlint, gosec) from the commit before merge.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 17.1 AIC · ⌖ 4.88 AIC · ⊞ 7K
Comment /matt to run again
Comments that could not be inline-anchored
actionlint:1
[/diagnosing-bugs] Binary executable committed to the repository root — this appears to be an unintended artifact from the fix process.
Committing compiled binaries (actionlint, gosec) bloats the repo, may cause confusion, and won't work on other platforms.
<details>
<summary>💡 Suggested fix</summary>
Remove both files before merge:
git rm actionlint gosecIf these were generated locally during debugging, also add them to .gitignore.
</details>
@copilot please addr…
There was a problem hiding this comment.
Review: fix: downgrade gosec to v2.27.1
The go.mod and go.sum changes correctly address the yaml/v4 MVS conflict — downgrading gosec/v2 to v2.27.1 and pinning go.yaml.in/yaml/v4 to rc.3 is the right fix.
However, there are two blocking issues:
Two binary executables have been accidentally committed to the repository root:
actionlint(~8 MB)gosec(~69 MB)
These should be removed from the PR and added to .gitignore. The Makefile already handles installing these tools via go install in the install-tools target.
Suggested .gitignore additions:
/actionlint
/gosec
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 22.3 AIC · ⌖ 4.91 AIC · ⊞ 5.3K
Comments that could not be inline-anchored
actionlint:1
Binary executable committed to repository root
This file is a compiled actionlint binary (~8 MB) accidentally committed to the repository root. Binary tool executables should not be tracked in git.
The Makefile already installs these tools via go install (see the install-tools target). Please remove this file and add /actionlint to .gitignore (similar to how /gh-aw and other built binaries are already excluded).
@copilot please address this.
gosec:1
Binary executable committed to repository root
This file is a compiled gosec binary (~69 MB) accidentally committed to the repository root. Binary tool executables should not be tracked in git.
Please remove this file and add /gosec to .gitignore. The Makefile installs gosec via go install github.com/securego/gosec/v2/cmd/gosec in the install-tools target.
@copilot please address this.
There was a problem hiding this comment.
Request changes: accidental binary commits must be removed
Dependency downgrade itself is a reasonable, well-explained workaround for the actionlint/gosec/yaml MVS conflict, but this PR also commits two large compiled binaries to the repo root — that must be fixed before merge.
💡 Blocking issue details
actionlint(8.4MB) andgosec(69MB) ELF executables are added as new files at the repo root (git showconfirmsactionlint | Bin 0 -> 8452012 bytesandgosec | Bin 0 -> 69372088 bytes).- These are almost certainly local build/tool artifacts accidentally staged (likely from running
go build/go installlocally, or a lint tool invocation) and not intended for version control. - Neither is covered by
.gitignore(onlygosec-report.jsonandgosec-results.sarifare ignored, not thegosecbinary itself oractionlint). - Committing ~78MB of unstripped debug binaries bloats the repository permanently (git history retains blobs even if deleted later), slows every future clone/fetch, and is a red flag for reviewers/CI since they may unintentionally get executed if referenced by path.
- Fix: remove both files from this commit (
git rm --cached actionlint gosec), and add/actionlintand/gosecto.gitignoreto prevent recurrence.
Secondary, non-blocking note: the gosec downgrade to v2.27.1 is a temporary workaround pinned to a pre-release yaml v4 (rc.3) — worth tracking for a future re-bump once upstream releases stabilize.
🔎 Code quality review by PR Code Quality Reviewer · aut00 · 13 AIC · ⌖ 4.64 AIC · ⊞ 7.8K
Comment /review to run again
| github.com/rivo/uniseg v0.4.7 // indirect | ||
| github.com/robfig/cron/v3 v3.0.1 // indirect | ||
| github.com/securego/gosec/v2 v2.28.0 // indirect | ||
| github.com/securego/gosec/v2 v2.27.1 // indirect |
There was a problem hiding this comment.
Downgrading gosec re-introduces older, potentially-fixed CVEs/lint checks; confirm no security regressions were lost between v2.27.1 and v2.28.0.
💡 Details
This is a workaround pin, not a real fix — go.yaml.in/yaml/v4 is still pre-release (rc.3), and gosec is pinned to an older minor. Worth adding a tracking comment/issue to re-bump both once actionlint or gosec releases a compatible version, so this downgrade isn't forgotten indefinitely.
|
@copilot please run the
Run: https://github.com/github/gh-aw/actions/runs/30492442799
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in commit What changed:
Both |
|
🎉 This pull request is included in a new release. Release: |
actionlint@v1.7.12usesyaml.ParserErrorand related fields fromgo.yaml.in/yaml/v4that existed inv4.0.0-rc.3but were removed inv4.0.0-rc.6.gosec/v2@v2.28.0pulled inrc.6, which MVS selected over actionlint's requiredrc.3, causing actionlint to fail to compile with:Changes
go.mod: Downgradegithub.com/securego/gosec/v2v2.28.0→v2.27.1—v2.27.1depends only ongo.yaml.in/yaml/v3, eliminating therc.6requirement from the graphgo.mod: Pingo.yaml.in/yaml/v4tov4.0.0-rc.3— the version actionlint declares and is compatible withgo.sum: Updated viago mod tidy