End-to-end demo that runs Safety on intentionally vulnerable dependencies, converts the JSON output to SARIF, and uploads to GitHub Code Scanning.
- Workflow:
.github/workflows/security-scan.ymlruns Safety, calls the SARIF converter action, and uploads SARIF withgithub/codeql-action/upload-sarif@v3(requiressecurity-events: write). - Vulnerable sample:
vulnerable-app/with outdated dependencies and insecure code paths to generate findings. - Evidence:
screenshots/placeholder for workflow run, alerts list, and alert detail captures.
python -m pip install safety
cd vulnerable-app
safety scan --file requirements.txt --output json --continue-on-error > ../safety-output.json
cd ..
python ../safety-sarif-action/converter.py --input safety-output.json --output safety.sarif --manifest vulnerable-app/requirements.txtInspect safety.sarif then upload with the workflow or upload-sarif action.