CLI reference and comparison with ZAP and Nuclei

Understand every CLI option, write custom passive rules in JSON without Rust compilation, and decide how web-vuln-scanner fits next to active DAST and static code analysis.

Custom passive rules via --rules

Custom rules are validated offline before any network request fires (checking duplicate IDs and preventing external cross-origin paths). Supported rule kinds include path_signature, header_missing, body_contains, and script_version:

{
  "name": "Internal Policy Rules",
  "version": "1.0",
  "rules": [
    {
      "id": "CUSTOM-ACTUATOR-HEALTH",
      "kind": "path_signature",
      "severity": "medium",
      "category": "exposed_files",
      "title": "Spring Actuator endpoint exposed (/actuator/health)",
      "summary": "Restrict diagnostic routes in reverse proxy config.",
      "remediation": "Deny public access to /actuator/* in Nginx.",
      "standard_ref": "Custom Policy",
      "path": "/actuator/health",
      "body_contains": "\"status\"",
      "ignore_html": true
    }
  ]
}

Frequently used CLI flags

FlagPurpose
--profile web | apiSelect full HTML crawling or API mode without browser UI checks.
--view executive | developer | securityTailor printed and exported report detail level.
--html, --md, --json, --sarifWrite standalone reports in multiple formats in a single scan.
--fix-config nginx | caddy | apachePrint targeted server hardening configuration blocks.
--max-pages, --max-requests, --concurrencyBound crawl scope and network rate safely on production hosts.
--fail-on critical | high | medium | lowExit with code 2 when findings meet or exceed threshold severity.

Choosing between defensive hygiene, active DAST, and SAST

Run web-vuln-scanner directly on production and staging URLs without risking form submissions or database writes. Use SAST tools like Semgrep or CodeQL inside pull requests to trace source code taint paths, and run active fuzzers like OWASP ZAP or Nuclei only against isolated test environments where write payloads are safe.

Frequently asked questions

How do I build the smallest Docker or CI binary?

Compile with cargo build --release --no-default-features --locked to omit desktop GUI libraries (eframe/rfd) while keeping the full scanner engine intact.

Where are project history files saved when using --project --save-run?

They are stored locally under ~/.config/web-vuln-scanner alongside triage states, never transmitted externally.

Related guides

GitHub Actions SARIF audit

Automate CLI scans in GitHub Workflows.

Nginx, Caddy, and Apache fixes

Turn scan findings directly into server proxy configs.

Exposed files and Git metadata scanner

Use path_signature custom rules alongside built-in exposure checks.