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@v3 to upload results
- Consider using a tool like:
npm-audit-resolver with SARIF export
- Custom script to convert npm audit JSON to SARIF
- Switch to
jeremylong/DependencyCheck which 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
References
AI generated by Plan Command for discussion #345
Objective
Enhance the
dependency-audit.ymlworkflow 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:
CodeQL and Trivy already upload SARIF successfully.
Approach
.github/workflows/dependency-audit.ymlgithub/codeql-action/upload-sarif@v3to upload resultsnpm-audit-resolverwith SARIF exportjeremylong/DependencyCheckwhich has built-in SARIF supportFiles to Modify
.github/workflows/dependency-audit.ymlscripts/npm-audit-to-sarif.js(if custom conversion needed)Acceptance Criteria
References
.github/workflows/codeql.yml(existing SARIF upload)Related to [plan] improve ci/cd pipeline and quality gates #348