Skip to content

feat(workflows)!: step 11, upload govulncheck findings as SARIF - #53

Open
seantronsen wants to merge 4 commits into
seantronsen/feat/lint-docsfrom
seantronsen/feat/sarif-govulncheck
Open

seantronsen wants to merge 4 commits into
seantronsen/feat/lint-docsfrom
seantronsen/feat/sarif-govulncheck

Conversation

@seantronsen

@seantronsen seantronsen commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

govulncheck now writes its findings as SARIF and uploads them to GitHub Advanced Security, like trivy-image-scan, scorecard, zizmor (lint-ci) and lint-docs already do. Findings appear as code scanning alerts in the Security tab, and as annotations on PRs where they land on changed lines.

  • govulncheck.yml: output-format: sarif, plus an upload-sarif step (category govulncheck) and security-events: write. SARIF mode exits 0 on findings, so a jq step after the upload fails the job on called vulnerabilities (SARIF level error), as text mode did before.
  • Docs: the caller example grants contents: read and security-events: write.

Stacked on #52.

Breaking changes

  • Callers must grant security-events: write to the govulncheck job, or the run fails to start.

Caveats

  • On pull_request runs from forks, the token is read-only and the SARIF upload fails. trivy-image-scan has the same gap.

Testing

Testbed: OpenCHAMI/github-actions-testbed#16 (a follow-up commit there calls a known-vulnerable symbol).

Locally: govulncheck v1.9.0 -format sarif in a golang:1.26 container. On a module that calls a vulnerable symbol it exits 0 and reports the finding at level error, and the jq check fails; on a clean module it reports only stdlib note findings, and the check passes. Text mode exits non-zero and zero on the same two modules. The workflow itself has not run on GitHub yet: still to check are the action's output-format/output-file inputs, the upload, and the PR display.

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • I have updated the relevant documentation (CLI examples, man pages, README, other docs, etc.)
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Dependency update
  • Build system/CI

@seantronsen
seantronsen changed the base branch from main to seantronsen/feat/lint-docs October 22, 2026 14:28
@seantronsen
seantronsen added this pull request to stack #40 October 22, 2026 14:28
@seantronsen seantronsen self-assigned this Oct 22, 2026
@seantronsen seantronsen changed the title Seantronsen/feat/sarif govulncheck feat(workflows)!: step 11, upload govulncheck findings as SARIF Oct 22, 2026
@seantronsen seantronsen added this to the v4.0.0 milestone Oct 22, 2026
@seantronsen
seantronsen force-pushed the seantronsen/feat/sarif-govulncheck branch from 1806d80 to 9aa4f9e Compare October 22, 2026 14:33
@seantronsen

Copy link
Copy Markdown
Contributor Author

failed experiment. I would prefer if the behavior for this was more like lint-docs. I'll have to revisit it on Monday.

@seantronsen

Copy link
Copy Markdown
Contributor Author

do not delete this branch or the PR. just closing for now to lessen noise.

@seantronsen seantronsen reopened this Oct 26, 2026
@seantronsen
seantronsen marked this pull request as ready for review October 26, 2026 14:58
@seantronsen
seantronsen requested review from alexlovelltroy and synackd and removed request for alexlovelltroy October 26, 2026 14:58
Comment thread .github/workflows/govulncheck.yml Resolved
Comment thread .github/workflows/govulncheck.yml Resolved
Comment thread .github/workflows/govulncheck.yml Resolved
@seantronsen
seantronsen force-pushed the seantronsen/feat/sarif-govulncheck branch 2 times, most recently from 7a546a0 to bc53037 Compare November 2, 2026 21:34
@seantronsen
seantronsen force-pushed the seantronsen/feat/sarif-govulncheck branch from bc53037 to eb6ca7a Compare November 2, 2026 22:05
@seantronsen
seantronsen requested a review from synackd November 2, 2026 22:56
@seantronsen
seantronsen force-pushed the seantronsen/feat/sarif-govulncheck branch from c1f8a2e to bc67efb Compare November 3, 2026 16:15
@seantronsen
seantronsen force-pushed the seantronsen/feat/sarif-govulncheck branch 2 times, most recently from 134dff1 to 38d0ba2 Compare November 5, 2026 00:03
(.[] | "- [`\(.path):\(.line)`](\($blob)/\(.path)#L\(.line))"))
end
' govulncheck.sarif > report.md
cat report.md >> "$GITHUB_STEP_SUMMARY"

@synackd synackd Nov 6, 2026 •

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.

Thanks for removing the public issue and report artifact. One disclosure path remains: this step writes vulnerability IDs, descriptions, and exact call-site links to the workflow run summary on every run, including default-branch scans. Readers of a public repository can view that summary, while the default-branch code scanning alert details require write access. Could the default-branch summary be generic, with the detailed findings kept in code scanning? PR summaries and inline annotations are public too. If that is the intended tradeoff for PR feedback, we'll need to document it explicitly.

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
…like lint-docs for issues

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
… repo issues

Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
Signed-off-by: Sean Tronsen <sean.tronsen@gmail.com>
@synackd
synackd force-pushed the seantronsen/feat/sarif-govulncheck branch from 38d0ba2 to ee287da Compare November 6, 2026 21:16
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.

2 participants