Semgrep in CI reports findings in `node_modules/`, `vendor/` and minified `dist/*.js`
BeginnerTroubleshootingSAST, SCA and secrets scanning in CI
Answer
Likely causes → No .semgrepignore, or a custom one that replaced the defaults. Build output is committed or produced before the scan.
Diagnose →
semgrep --config auto --json . | jq -r '.results[].path' | cut -d/ -f1 | sort | uniq -c
Fix → Add .semgrepignore:
node_modules/
vendor/
dist/
*.min.js
Run the SAST job before the build step.
Prevent → Third-party code belongs to SCA, not SAST. Keep ignore files in the repo template.
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 job takes 35 minutes and gets killed with `exit code 137`IntermediateSonarQube Quality Gate fails on "Security Hotspots Reviewed is less than 100%" but there are no vulnerabilitiesBeginner