ci: feed osv-scanner CVE findings to code scanning via MegaLinter SARIF - #84
Merged
Merged
Conversation
Add MegaLinter scoped purely as a SARIF security feed: it runs only osv-scanner (dependency CVE scanning), aggregates to a single SARIF via SARIF_REPORTER, and a workflow step uploads that to Security > Code scanning. Style/correctness linting stays owned by the existing turbo/eslint/prettier/cargo/typos/tombi/cargo-shear stack. Findings are non-blocking (REPOSITORY_OSV_SCANNER_DISABLE_ERRORS) and the upload is continue-on-error, so transitive-dependency CVE noise never gates a PR and forked PRs without code-scanning write access don't fail. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds MegaLinter to CI, scoped purely as a SARIF security feed into GitHub Security → Code scanning:
.mega-linter.yml—ENABLE_LINTERS: REPOSITORY_OSV_SCANNERruns only osv-scanner (dependency CVE scanning).SARIF_REPORTER: trueaggregates its output tomegalinter-reports/megalinter-report.sarif.REPOSITORY_OSV_SCANNER_DISABLE_ERRORS: truekeeps findings advisory..github/workflows/megalinter.yml— runs MegaLinter on PRs and pushes tomain, then uploads the SARIF viagithub/codeql-action/upload-sarifunder themega-lintercategory.Why
Surfaces known CVEs in our dependency tree in the repo's Security tab, without touching the existing lint stack.
Reviewer notes
ENABLE_LINTERSis an allowlist, so MegaLinter runs osv-scanner and nothing else — no duplication or conflict with that stack.continue-on-error, so transitive-dependency CVE noise never gates a PR, and forked PRs without code-scanning write access won't fail the job. Both the linter and upload steps useif: ${{ !cancelled() }}so findings still upload.v9.6.0,codeql-action/upload-sarifv4.37.1,upload-artifactv7.0.1,checkoutv6.0.2.🤖 Generated with Claude Code
Note
Low Risk
CI-only addition with read-mostly permissions, non-blocking CVE reporting, and no application or auth logic changes.
Overview
Adds a MegaLinter CI path whose only job is to run osv-scanner and push dependency CVE results into GitHub Security → Code scanning, without changing the repo’s existing lint stack.
.mega-linter.ymlturns on onlyREPOSITORY_OSV_SCANNER, scans the full tree on every run, emits aggregated SARIF, and keeps findings advisory (REPOSITORY_OSV_SCANNER_DISABLE_ERRORS: true) so CVEs don’t fail builds..github/workflows/megalinter.ymlruns on PRs andmainpushes: checkout → MegaLinterci_light→ best-effort SARIF upload (continue-on-error,mega-lintercategory) → artifact archive of reports and logs. Job-levelsecurity-events: writeis scoped to the upload step’s needs.Reviewed by Cursor Bugbot for commit 5d9ab05. Bugbot is set up for automated code reviews on this repo. Configure here.