Semgrep "rule errored" / "Partial results" timeout in CI
Semgrep can complete a scan while some rules time out or error on specific files. It reports "Partial results" and a non-scan error, which means the run did not fully cover the codebase even if no findings surfaced.
What this error means
Semgrep prints "X rules errored", "Partial results", or "Timeout when running rule on file". The scan may report "no findings" while quietly skipping files.
Timeout when running python.lang.correctness rule on src/big_generated.py.
Partial results: 2 rules errored, 1 file skipped.Common causes
A rule times out on a large or generated file
Complex patterns over big or machine-generated files can exceed the per-rule timeout and error out.
A rule crashes on unusual syntax
Edge-case syntax or a parser limitation makes a specific rule error on certain files.
How to fix it
Raise timeouts and exclude generated files
- Increase the per-rule timeout for large files.
- Add generated and vendored paths to
.semgrepignore. - Re-run and confirm no rules error.
semgrep scan --config auto --timeout 60 --timeout-threshold 3Exclude problem paths
List generated or minified files in .semgrepignore so rules do not run on them.
# .semgrepignore
dist/
**/*.min.js
src/generated/How to prevent it
- Exclude generated/vendored code from the scan.
- Set a per-rule timeout appropriate for your largest files.
- Treat partial results as a failure to investigate, not a pass.