Repository navigation
feat(go-pr-analysis): let callers gate on govulncheck instead of only logging it - #947
Merged
Merged
Conversation
… logging it The "Run govulncheck" step carried a bare `continue-on-error: true`, so a known vulnerability in a consumer's dependency graph left the Security job green and the finding sat in a job log nobody opens on a passing check. Removing the flag outright would be a break for every repository on the channel: the Go vulnerability database moves independently of the pull request, so a newly published CVE in a common dependency would turn them all red at once, on pull requests touching nothing related — the same shape of breakage x/vuln v1.8.0 already caused here. So the step now branches on the exit code instead. Findings are always annotated: a warning by default, an error — failing the job — when the new `fail_on_govulncheck` input is true. The default keeps today's behaviour, and a repository that has cleaned its graph can opt into the gate on its own schedule. Closes #910
Contributor
🔍 PR Validation Summary✅ PR Mergeable — no blocking failures
|
Contributor
🔍 Lint Analysis
|
Contributor
🛡️ CodeQL Analysis ResultsLanguages analyzed: ✅ No security issues found. 🔍 View full scan logs | 🛡️ Security tab |
Contributor
|
@coderabbitai review |
✅ Action performedReview finished.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Actions Shared Workflows
Description
go-pr-analysis.ymlran govulncheck with a barecontinue-on-error: true. A known vulnerability in a consumer's dependency graph therefore left the Security job green, and the finding stayed in a job log nobody opens on a passing check — every Go repository on the channel read "security passed" without proof that it had.Removing the flag outright would be a break for every consumer at once. The Go vulnerability database moves independently of the pull request, so the day a reachable CVE lands in a common dependency, every repository on the channel goes red on pull requests that touch nothing related — the same shape of breakage
x/vulnv1.8.0 already caused here, as thegovulncheck_versioninput description records.So the step branches on the exit code instead of swallowing it:
fail_on_govulncheckinput (boolean,default: false) ingo-pr-analysis.yml, forwarded bygo-pr-validation.yml.false(today's behaviour): the job still passes, but the finding is now emitted as a::warning::annotation instead of being buried in the log.true: the finding is emitted as::error::and the Security job fails, which propagates throughchecks_passedto the Go Analysis gate.A repository opts into the gate once its dependency graph is clean, which is the sequence the issue asks for — run the analysis against the consumers and fix or accept what it reports before flipping anything globally.
Out of scope, deliberately:
make sec/ gosec-no-failin the same job and the Trivyexit-code: '0'inpr-security-scan.ymlremain advisory, and the default here staysfalse. Flipping the channel-wide default is a separate, evidence-backed decision.Type of Change
feat: New workflow or new input/output/step in an existing workflowfix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)perf: Performance improvement (e.g. caching, parallelism, reduced steps)refactor: Internal restructuring with no behavior changedocs: Documentation only (README, docs/, inline comments)ci: Changes to self-CI (workflows under.github/workflows/that run on this repo)chore: Dependency bumps, config updates, maintenancetest: Adding or updating testsBREAKING CHANGE: Callers must update their configuration after this PRBreaking Changes
None.
fail_on_govulncheckdefaults tofalse, which is exactly the pass/fail behaviour the step had before. The only observable difference for a caller that changes nothing is a warning annotation where there was previously silence.Testing
@this-branchor the beta tagactionlintclean on both modified workflows. The caller-side value isfail_on_govulncheck: trueon a repository with a known finding; this PR's own self-CI exercises the default path.Caller repo / workflow run:
Related Issues
Closes #910