Overview
Whitebox scanning combines source code analysis (SAST) with dynamic scanning (DAST) to maximize vulnerability coverage. By analyzing the application source, Vigolium discovers routes that may not be reachable through crawling alone, and enriches dynamic scan results with source-level context.What —source Does
The--source flag points Vigolium at the application source code. When provided, it enables:
- SAST route extraction: Uses ast-grep to statically analyze source code and discover HTTP routes, API endpoints, and handler functions across supported frameworks.
- Route probing: Discovered routes are probed with live HTTP requests against the target to verify reachability and capture real responses.
- Persistent source association: The source path is linked to the project in the database, enabling ongoing source-aware analysis across scans.
- Source-aware agent analysis: Agent modes receive source code context for more targeted and informed security analysis.
Basic Whitebox Scan
Point Vigolium at both the target URL and the local source directory:whitebox strategy activates SAST route extraction before the dynamic scan phases. Discovered routes are parameterized, probed, and fed into the scanner alongside any other inputs.
Remote Repository
If the source code is hosted in a remote Git repository:SAST-Only
To run only the static analysis phase without any dynamic scanning:Ad-Hoc SAST
The--sast-adhoc flag runs a one-off SAST analysis without creating a persistent source association in the database:
Agent-Enhanced Whitebox
For AI-driven source-aware scanning, use the swarm agent mode with the--source flag:
- Analyzes the source code to understand application architecture and identify high-value targets.
- Discovers routes from source and filters them by the target hostname.
- Generates custom JavaScript scanner extensions tailored to the application.
- Executes targeted scans and triages results with source-level context.
--target flag is required when using --source with swarm mode so that discovered routes can be filtered to the correct hostname.
Route Parameterization
When Vigolium extracts routes from source code, many contain parameter placeholders in various framework-specific formats:| Format | Example | Framework |
|---|---|---|
:param | /users/:id | Express, Gin, Echo |
{param} | /users/{id} | Spring, FastAPI, .NET |
<type:param> | /users/<int:id> | Flask |
- id, user_id: Numeric values (e.g.,
1) - uuid: Valid UUID format (e.g.,
550e8400-e29b-41d4-a716-446655440000) - email: Email format (e.g.,
[email protected]) - slug: URL-safe string (e.g.,
test-item) - Other names: Generic string values
