SARIF upload rejected: `SARIF file is too large` / `too many results`
IntermediateTroubleshootingSAST, SCA and secrets scanning in CI
Answer
Likely causes → The tool output exceeds GitHub limits (compressed size and result count per run), usually because vendored code or every severity is included.
Diagnose →
jq '[.runs[].results | length] | add' results.sarif
ls -lh results.sarif
Fix → Exclude vendored paths, filter severity (trivy fs --severity HIGH,CRITICAL --format sarif), or split into multiple categories.
Prevent → Treat SARIF as a curated signal, not a dump; keep low-severity output as build artifacts.
More on SAST, SCA and secrets scanning in CI
gitleaks fails the PR on `tests/fixtures/fake_rsa.pem` and `testdata/aws_creds.json`, which only contain dummy valuesBeginnergitleaks passes locally but the CI job reports 40 old leaks nobody touched in this PRIntermediate`fatal: ambiguous argument 'origin/main..HEAD': unknown revision` in the secrets-scan stepBeginnerSemgrep flags `subprocess.run(cmd, shell=True)` in a script where `cmd` is a hard-coded constantBeginnerSemgrep in CI reports findings in `node_modules/`, `vendor/` and minified `dist/*.js`BeginnerSemgrep job takes 35 minutes and gets killed with `exit code 137`Intermediate