feat(security): dependency vulnerability scanner #562

Merged
jmiller merged 1 commits from feat/dependency-scanner into dev 2026-06-07 16:12:32 +00:00
Owner

Summary

  • Add dependency vulnerability scanner module that checks project dependencies against known CVEs via the OSV.dev API
  • Parses go.mod, package.json, composer.json, and requirements.txt
  • Wire into existing scanner orchestrator for automatic push-time scanning

Closes #551

Details

  • Implements the existing Scanner interface (Type, ScanCommit, ScanTree)
  • Batch queries OSV.dev (up to 1000 deps per request, 30s timeout)
  • CVSS v3 vector string parsing for severity mapping (Critical/High/Medium/Low)
  • Defaults to Medium severity when no CVSS data is available
  • Fingerprint dedup via sha256(vuln_id + package + version)
  • Skips vendor/, node_modules/, testdata/ directories
  • Reuses existing security_alert table (no migration needed)

Test plan

  • Verify build compiles on server
  • Push to a repo with a go.mod containing a known vulnerable dependency
  • Confirm alerts appear in the Security tab with correct CVE IDs and severity
  • Test with package.json, composer.json, requirements.txt repos
  • Verify dedup - re-push should update existing alerts, not create duplicates
  • Test with DependScanner disabled in repo settings - should skip scanning
## Summary - Add dependency vulnerability scanner module that checks project dependencies against known CVEs via the OSV.dev API - Parses go.mod, package.json, composer.json, and requirements.txt - Wire into existing scanner orchestrator for automatic push-time scanning Closes #551 ## Details - Implements the existing `Scanner` interface (`Type`, `ScanCommit`, `ScanTree`) - Batch queries OSV.dev (up to 1000 deps per request, 30s timeout) - CVSS v3 vector string parsing for severity mapping (Critical/High/Medium/Low) - Defaults to Medium severity when no CVSS data is available - Fingerprint dedup via sha256(vuln_id + package + version) - Skips vendor/, node_modules/, testdata/ directories - Reuses existing `security_alert` table (no migration needed) ## Test plan - [ ] Verify build compiles on server - [ ] Push to a repo with a go.mod containing a known vulnerable dependency - [ ] Confirm alerts appear in the Security tab with correct CVE IDs and severity - [ ] Test with package.json, composer.json, requirements.txt repos - [ ] Verify dedup - re-push should update existing alerts, not create duplicates - [ ] Test with DependScanner disabled in repo settings - should skip scanning
jmiller added 1 commit 2026-06-07 15:33:06 +00:00
feat(security): add dependency vulnerability scanner (#551)
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Report Issues (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Repo Health / Access control (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || 'development' }}) (pull_request) Successful in 1m22s
18fc79fa0a
Add dependency scanner module that parses manifest files (go.mod,
package.json, composer.json, requirements.txt) and checks dependencies
against the OSV.dev API for known CVEs. Implements the existing Scanner
interface and wires into the orchestrator for push-time scanning.
jmiller merged commit 75316bf80a into dev 2026-06-07 16:12:32 +00:00
jmiller deleted branch feat/dependency-scanner 2026-06-07 16:12:33 +00:00
Sign in to join this conversation.