--auth and --auth-file flags. This enables scanning behind login walls and detecting authorization bypass vulnerabilities (IDOR/BOLA).
The
--auth / --auth-file flags were previously named --session / --session-file, and a single bundle file holding multiple sessions used the separate --auth-config flag. The old names still work as deprecated aliases (--session → --auth, --session-file → --auth-file), and --auth-file now also accepts the multi-session sessions: bundle that used to require --auth-config. Update your commands to the new names..json) or by content sniffing (leading { or [).
Separate from configured sessions, the browser crawler can also try a short list of common default credentials (
admin:admin, …) against a confirmed local login form during spidering, so the crawl reaches authenticated areas without an --auth session. It’s off by default and auto-enabled at balanced/deep intensity, negative-control gated, and never a brute-force. See Default-credential login attempts.When
--spider runs, any session the browser establishes — cookies from a cleared WAF/bot challenge plus its User-Agent — is carried forward into the discovery and scanning phases (per host), so later probes reuse the cleared session. It’s on by default; disable with --no-carry-browser-session, and your own -H/--header overrides always win. See Session carry-forward.Quick Start
Authentication Flags
Both flags can be combined. If no session is explicitly marked as
primary, the first session loaded is used as the primary.
Session Roles
Each session has a role that determines how it is used during the scan:primary: The main session. Used for discovery, spidering, and as the default requester during the audit phase. There should be exactly one primary session.compare: Comparison sessions for IDOR/BOLA testing. During the audit phase, every request made by the primary session is replayed with each compare session’s credentials. If a compare session can access resources it shouldn’t, theauthz-comparemodule flags it.
Inline Sessions
The--auth flag accepts sessions in name:Header:value format:
Session Files
For sessions with multiple headers or login flows, use files. Both YAML and JSON formats are supported.Static Headers
YAML:session_dir (default ~/.vigolium/sessions/) if the path is not absolute. See Session Strategy Configuration below.
Login Flows
Session files can define automated login flows. The scanner executes the login request at scan start and extracts credentials from the response. YAML:Extraction Sources
The
apply_as field defines how the extracted value is applied as a request header. Use {value} as a placeholder.
Multi-Session Bundle File
A bundle file defines all sessions in one place under asessions key, and is loaded with --auth-file (this is what the removed --auth-config flag used to do).
YAML Format
JSON Format
When to Use JSON
JSON is a good choice when:- AI agents generate session configs: most LLMs produce cleaner JSON than YAML, and agent modes (swarm, autopilot) already output session config as JSON natively.
- Programmatic generation: scripts, CI pipelines, or tools that build session configs are often simpler in JSON.
- Embedding in other JSON payloads: e.g., the REST API
POST /api/agent/run/swarmbody includes session config as a nested JSON object.
Format Detection
The format is detected automatically:- File extension:
.jsonfiles are parsed as JSON;.yaml/.ymlas YAML. - Content sniffing: if the extension is ambiguous (or missing), content starting with
{or[(after whitespace trimming) is parsed as JSON. - Fallback: everything else is parsed as YAML.
Session Config Schema Reference
Both YAML and JSON use the same field names. Here is the full schema:headers, login, or login_request can be set per session.
Managing Sessions with the auth Command
The --auth/--auth-file flags load sessions for a single scan. The vigolium auth subcommand manages reusable, persisted sessions and provides helpers for validating configs and automating 2FA.
List stored sessions
Load sessions into the database
auth load persists sessions so subsequent scans pick them up automatically. It accepts a native config file, an agent-produced session-config.json, stdin, or even a raw HTTP login request (which it sends, then auto-discovers tokens from the JSON body, Set-Cookie, and auth headers):
load executes each login flow once to verify the credentials work; pass --no-validate to skip. Agent format is auto-detected when the path contains agent-sessions/ (or force it with --agent-format). The hostname is derived from the first login URL when --host is omitted.
Lint a session config
Catch mistakes before a scan — missing/invalid fields, bad extract rules, unknown login or extract types, multiple primary sessions, or duplicate names:Generate a TOTP code for 2FA
For automating two-factor login flows,auth totp turns a base32 secret into the current code (JSON output, {"code": "...", "expires_in": <seconds>}):
Environment Variables
Session files (both YAML and JSON) support${VAR} syntax for secrets. This keeps credentials out of config files:
${VAR} references are expanded from the environment at load time, before format parsing.
IDOR/BOLA Testing
To test for authorization bypass vulnerabilities, define at least two sessions, one primary and one or more compare sessions. YAML:authz-compare module automatically activates when compare sessions are present. It replays primary session requests with compare session credentials and flags responses that indicate broken access control.
How Detection Works
- The primary session makes a request and gets a response (e.g.,
GET /api/users/42-> 200 OK with user data). - The same request is replayed with each compare session’s credentials.
- If a compare session also receives a successful response with similar content, the module reports a potential IDOR/BOLA finding with High severity.
Filtering to Auth Modules Only
To run only authorization testing without other active modules:How Sessions Affect Scan Phases
Session Strategy Configuration
Session behavior is configured underscanning_strategy.session in vigolium-configs.yaml (see public/vigolium-configs.example.yaml for the full annotated example).
Field Reference
Session Directory Resolution
When--auth-file receives a bare name (no path separators), the scanner resolves it from session_dir. Extensions are tried in order: .yaml, .yml, .json.
.yaml is appended as the default. Absolute paths and relative paths with directory separators (e.g. ./sessions/myapp.json) bypass session_dir and are used as-is.
To change the lookup directory:
Common Patterns
Unauthenticated discovery, authenticated scanning:authz-compare module stays inactive.
Long-running scan with token refresh:
validate_url confirms credentials work after each login before resuming scanning.
Team shared sessions directory:
--auth-file staging-admin resolves the same file for everyone.
Scanning profiles (~/.vigolium/profiles/) can also override session strategy values, useful for having a “quick unauthenticated” profile alongside a “deep authenticated” profile.
Using Session Config with Agent Modes
Agent modes (swarm, autopilot) can auto-generate session configs from source code analysis. The generated configs are always written as JSON to the session directory.
When running agent swarm with --source, the source-analysis phase discovers authentication flows in the codebase and produces a session-config.json and auth-config.yaml in the session directory. This config is then fed into subsequent scan phases automatically.
Swarm accepts a pre-built bundle via its own --auth-config flag (it skips browser/CLI auth synthesis and uses the file verbatim). Autopilot does not take a pre-built file. For both autopilot and swarm, put credentials, roles, login URL, and browser requirements in --prompt (or the positional prompt); browser tooling is always available and the intent parser extracts the auth signals:
credentials, credential_sets, auth_required, requires_browser, browser_start_url, and focus_routes fields. Their removal applies to the autopilot/swarm CLI flags only.
