feat: dependency scan reusable workflow — osv-scanner (#5)#54
Open
ms280690 wants to merge 1 commit into
Open
Conversation
Application-source dependency vulnerability scan, first sub-issue of #8. - .github/actions/osv-scanner: composite that installs a pinned, checksum-verified osv-scanner v2.4.0 binary and scans all lockfiles against the OSV database (language-agnostic). Produces SARIF (optionally uploaded to the Security tab) and emits job-level annotations per affected package. Gates on fail-on-severity by mapping it to a CVSS threshold (critical>=9.0, high>=7.0, medium>=4.0, low>=0.1) parsed from groups[].max_severity. - .github/workflows/dep-scan-app.yml: reusable gate; inputs directory, fail-on-severity, sarif-upload, actions-ref. Immutable self-reference pattern; no harden-runner; inherits caller permissions. - ci.yml: osv-scanner dogfood (smoke test — no lockfiles in this repo). - README + approved-actions: usage, CVSS threshold mapping, osv.dev egress note. osv-scanner has no native fail-on-severity flag (nor does the official reusable workflow — only fail-on-vuln), so the gate is implemented by parsing the JSON report's max_severity. Kept the checksum-verified binary pattern (consistent with gitleaks/trufflehog/tflint/kubeconform; no new org-allowlist publisher). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🤖 Hi @ms280690, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
ms280690
requested review from
Copilot and
michaelconnor00
and removed request for
Copilot
July 16, 2026 21:23
|
🤖 I'm sorry @ms280690, but I was unable to process your request. Please see the logs for more details. |
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.
Closes #5. Application-source dependency vulnerability scan — first sub-issue of parent #8. Establishes the
dep-scan-*.ymlpattern that #6 (checkov) and #7 (trivy) will follow.What
.github/actions/osv-scanner/action.yml.github/workflows/dep-scan-app.ymldirectory,fail-on-severity,sarif-upload,actions-ref..github/workflows/ci.ymlREADME.md,docs/approved-actions.mdAcceptance criteria (#5)
dep-scan-app.yml: osv-scanner onpull_request; scans all lockfiles; PR annotations; blocks on Critical; SARIF to Security tabfail-on-severityinput (defaultcritical)Design notes
fail-on-severityis custom — osv-scanner has no native severity gate (nor does the official reusable workflow, which only hasfail-on-vuln). Implemented by parsinggroups[].max_severity(numeric CVSS) and mapping: critical ≥ 9.0, high ≥ 7.0, medium ≥ 4.0, low ≥ 0.1.harden-runner, inherits caller permissions (security-events: writeonly whensarif-upload), immutableactions-refpattern.sarif-upload: falsefor private repos without a Code Security license (annotations + log still work).Verified locally
Checksum verify; scan of a known-vulnerable
requests==2.19.0lockfile → max CVSS 8.9; gate correctly passes atcritical(9.0), blocks athigh/medium; per-package annotations with CVE IDs.🤖 Generated with Claude Code