Supply Chain Security – Extended Repository Scan Duration and Timeouts
Overview
Code repository scans in Aqua Supply Chain Security run through multiple phases: filesystem analysis, SAST, and reachability analysis. Scans that approach the platform time limit (often around four hours per job) are usually dominated by SAST and reachability, not by initial filesystem/Trivy work. Debug logging on on-premises scanners can further extend runtime and should be disabled in production.
Symptoms
Repositories remain in progress for many hours or hit scan timeouts
Elevated failure counts after enabling verbose scanner logging
Many concurrent repositories from the same integration affected at once
Common Cause: Debug and Verbose Scanner Settings
On on-premises CodeSec scanner deployments, environment variables such as:
scan:
extraEnv:
TRIVY_DEBUG: "true"
LOG_LEVEL: "debug"
SCAN_TIMEOUT: "30m0s"increase overhead and log volume. Remove TRIVY_DEBUG, set log level to production defaults, restart the CodeSec scanner, and re-run affected repositories.
Scan Phase Behavior
Engineering analysis of prolonged jobs typically shows:
Filesystem / Trivy phase completes within expected windows (often ~15 minutes for large repos)
SAST and reachability account for most of the remaining duration
Historical median SAST times can exceed two hours for dependency-heavy repos; P90 can approach four hours
Repository composition factors:
Large
bower_componentsor vendored dependency treesMany npm manifest files under vendored paths (roughly half of manifests in deeply nested vendor dirs in some estates)
More files and manifests increase SAST/reachability work
What to Expect
Not all slow scans indicate failure; some complete successfully after long SAST phases
A subset of repos may finish after peers when queue and scanner capacity free up
Disabling debug settings does not remove legitimate long SAST runs on monorepos with heavy JavaScript vendoring
Recommended Actions
Revert non-production debug env vars on scanners and restart the component.
Identify repos still timing out after 24–48 hours without debug enabled.
Provide standard (non-debug) scanner logs only for failed jobs when opening support cases.
Consider CI hygiene: reduce committed
node_modules/bower_componentswhere policy allows, to shrink SAST scope.
Verification
Compare scan queue duration before and after removing
TRIVY_DEBUGTrack how many repositories in a failing batch eventually reach Completed
Monitor integration-level backlog during scheduled bulk scan windows (for example weekend batch jobs)
Platform Coverage
Component: Supply Chain Security, CodeSec Scanner
Deployment: On-premises scanner integrations and SaaS
Summary
Observation | Interpretation |
|---|---|
| Remove for production; restart scanner |
Long runs with quick filesystem phase | Normal for heavy SAST/reachability |
Vendored JS/npm trees | Common contributor to duration |
Related Resources
Did you find it helpful? Yes No
Send feedback