.havoc.yml Reference

HAVOC reads configuration from a .havoc.yml file in your project root. Run havoc init to generate a starter config. All settings are optional — HAVOC uses sensible defaults if no config file exists.

Full example

# .havoc.yml
version: 1

# Project settings
project:
  name: "My Laravel App"
  framework: laravel  # Auto-detected if omitted

# Scan settings
scan:
  paths:
    - app/
    - routes/
  exclude:
    - "app/Console/**"
    - "tests/**"
    - "database/**"
    - "vendor/**"
  follow_symlinks: false

# Analyzer configuration
analyzers:
  enabled: all  # 'all' or list of analyzer IDs
  # Or use explicit list:
  # enabled:
  #   - authorization-coverage
  #   - mass-assignment
  #   - xss-blade
  disabled:
    - credential-exposure  # If you handle credentials differently

  # Per-analyzer overrides
  authorization-coverage:
    exclude_methods:
      - "__construct"
      - "middleware"
      - "redirectIfAuthenticated"
    count_middleware_as_covered: true

  mass-assignment:
    severity_override: medium  # Downgrade from high

# Thresholds
thresholds:
  fail_on: high        # critical | high | medium | low | never
  min_coverage: 80     # Fail if authorization coverage drops below %
  max_findings: ~      # Optional: fail if finding count exceeds N

# Ignore specific findings
ignore:
  # By finding ID (suppress across all files)
  - id: HAVOC-103
    reason: "Known false positive in legacy admin controller"

  # By file + line range
  - file: app/Http/Controllers/Admin/LegacyController.php
    lines: 45-60
    reason: "Pre-auth endpoint, no authorization needed"

  # By rule + file pattern
  - rule: xss-blade
    path: "resources/views/email/**"
    reason: "Email templates are not user-facing HTML"

# Output configuration
output:
  format: text         # text | json | sarif | github
  show_context: true   # Show code context around findings
  group_by: severity   # severity | file | rule

# Cloud sync
cloud:
  enabled: true        # Requires HAVOC_TOKEN env var
  project_id: ~        # Auto-set from token if omitted

Top-Level Options

KeyTypeDefaultDescription
versioninteger1Config file schema version. Currently only version 1 is supported.
project.namestringdirectory nameDisplay name for this project in HAVOC Cloud
project.frameworkstringauto-detectFramework: laravel, rails (future), django (future)

Analyzers

KeyTypeDefaultDescription
analyzers.enabledstring or listallUse all or explicit list of analyzer IDs
analyzers.disabledlist[]Analyzer IDs to disable (takes precedence over enabled)
analyzers.{id}.severity_overridestringOverride default severity for an analyzer
analyzers.authorization-coverage.exclude_methodslist[]Method names to exclude from coverage calculation
analyzers.authorization-coverage.count_middleware_as_coveredbooleantrueCount route middleware as an authorization check

Analyzer IDs

IDDescriptionDefault Severity
authorization-coverageMissing authorize() / Gate:: checkshigh
mass-assignmentUnguarded fillable propertieshigh
xss-bladeUnescaped {{ vs {!! outputmedium
sql-injectionRaw DB queries with user inputcritical
idorDirect object reference without ownership checkhigh
policy-parityPolicy methods missing for model actionsmedium
privilege-escalationRole/permission assignments without checkshigh
state-machineState transitions without guardsmedium
credential-exposureKeys/secrets in code or configcritical

Thresholds

KeyTypeDefaultDescription
thresholds.fail_onstringhighExit code 1 if findings at this severity or above exist
thresholds.min_coverageintegerExit code 3 if authorization coverage is below this %
thresholds.max_findingsintegerExit code 1 if total findings exceed this count

Ignoring Rules

Use the ignore section to suppress known false positives or accepted risks. Every ignore entry requires a reason — this is enforced to prevent silent suppression.

ignore:
  # Suppress by finding ID
  - id: HAVOC-103
    reason: "Legacy endpoint, scheduled for removal in Q2"

  # Suppress a rule for a file pattern
  - rule: xss-blade
    path: "resources/views/admin/raw-html/**"
    reason: "Content is sanitized by DOMPurify on the client"

  # Suppress a line range in a specific file
  - file: app/Http/Controllers/WebhookController.php
    lines: 10-45
    reason: "Webhook endpoint uses HMAC verification instead of OAuth"
Audit trail: All ignored findings are logged in HAVOC Cloud with the reason, author, and timestamp. They appear as "Suppressed" in the dashboard and count against your coverage grade.

Output

KeyOptionsDefaultDescription
output.formattext, json, sarif, githubtextOutput format. github uses GitHub Actions annotation syntax.
output.show_contextbooleantrueShow 3 lines of code context around each finding
output.group_byseverity, file, ruleseverityHow to group findings in text output