-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
Description
Objective
Enhance the dependency-audit.yml workflow to upload npm audit results as SARIF to the GitHub Security tab, improving visibility of dependency vulnerabilities.
Context
Currently, npm audit results only appear in workflow logs, making it difficult to:
- Track vulnerabilities across PRs
- Triage security issues in one place
- Get alerts for new vulnerabilities
CodeQL and Trivy already upload SARIF successfully.
Approach
- Update
.github/workflows/dependency-audit.yml - Add step to convert npm audit JSON output to SARIF format
- Use
github/codeql-action/upload-sarif@v3to upload results - Consider using a tool like:
npm-audit-resolverwith SARIF export- Custom script to convert npm audit JSON to SARIF
- Switch to
jeremylong/DependencyCheckwhich has built-in SARIF support
Files to Modify
- Update:
.github/workflows/dependency-audit.yml - Potentially create:
scripts/npm-audit-to-sarif.js(if custom conversion needed)
Acceptance Criteria
- npm audit results appear in Security tab (Code scanning alerts)
- SARIF upload succeeds in workflow
- Vulnerabilities are properly categorized by severity
- Workflow continues to fail on high/critical vulnerabilities
References
- SARIF format: https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
- GitHub SARIF upload: https://github.com/github/codeql-action/tree/main/upload-sarif
- Example:
.github/workflows/codeql.yml(existing SARIF upload)
Related to [plan] improve ci/cd pipeline and quality gates #348
AI generated by Plan Command for discussion #345
Reactions are currently unavailable