Getting Started with HAVOC

HAVOC is a framework-aware security scanner that understands your Laravel application's security model. Unlike generic SAST tools, HAVOC knows what a missing $this->authorize() call means in context โ€” and only flags what's actually exploitable.

Free CLI โ€” The CLI and GitHub Action are free to use. The cloud dashboard (history, trends, AI features) is a paid add-on.

Quickstart

1

Install the CLI

Install globally via npm:

npm install -g @havoc-security/cli

# Verify
havoc --version  # havoc v1.0.0

Or run without installing: npx @havoc-security/cli scan

2

Run your first scan

From the root of your Laravel project:

havoc scan

HAVOC parses your project and runs all 15 Laravel analyzers. A 1,084-file application scans in about 0.7 seconds; your run's exact duration is reported as metadata.durationMs.

3

Add to CI

Create .github/workflows/havoc.yml:

name: HAVOC Security Scan
on: [push, pull_request]

jobs:
  havoc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@@v4
      - uses: havoc-security/scan-action@@v1
        with:
          api-key: {{ secrets.HAVOC_API_KEY }}
4

Connect to the cloud (optional)

Sign in at havoc.cloud with GitHub, then:

havoc auth login

Enables dashboard, historical trends, AI triage, and team features.

Installation

npm (recommended)

npm install -g @havoc-security/cli

Run without installing

npx @havoc-security/cli scan
Not a Composer package — HAVOC's CLI is distributed on npm, not Packagist. It analyses PHP but is written in TypeScript, so it needs Node 20+ rather than an entry in your composer.json.

System requirements

RequirementMinimumNotes
Node.js18.xRequired for npm install
PHP8.1Required to scan PHP projects
GitAnyFor diff-aware CI scanning

Your First Scan

When you run havoc scan, HAVOC:

  1. Detects your framework from composer.json
  2. Parses PHP files into an AST
  3. Runs all 15 analyzers
  4. Deduplicates findings
  5. Calculates authorization coverage %
  6. Outputs results to terminal or cloud

The 15 analyzers

Each looks for a distinct category of vulnerability. Full reference, including how much each one has been measured — 7 are production-ready, 7 partial, 1 a stub.

AnalyzerLooks for
Authorization CoverageController actions reachable without a policy, Gate or authorization middleware.
Mass AssignmentEloquent models that accept attributes they should not, including privilege-bearing columns.
SQL InjectionRaw SQL built from user-controlled input, rather than parameterised.
XSS SurfaceUnescaped Blade output that can carry user-controlled data into the page.
IDORNested parent/child routes whose handler does not establish ownership of the child.
Privilege EscalationPaths where a user could grant themselves or others elevated roles or permissions.
Credential ExposureSecrets committed in tracked source, and configuration that leaks in production.
Session SecuritySession and cookie configuration that weakens session and CSRF defences.
File UploadUploads accepted without type or size constraints, or written where they can be served back.
Rate LimitingRoutes with no throttle, weighted toward authentication and state-changing requests.
Encryption at RestSensitive columns stored without encryption.
Insecure DeserializationDeserialization of user-controlled data, which can lead to object injection.
Open RedirectRedirects whose destination comes from unvalidated user input.
Security HeadersMissing response headers for clickjacking, MIME sniffing and transport security.
Dependency AuditComposer dependencies with published security advisories.

Understanding output

๐Ÿ”ด HIGH  [HAVOC-001] Missing authorization gate
   TransactionController.php:142
   bulkConfirm() has no $this->authorize() call

๐ŸŸก MED   [HAVOC-002] Unescaped Blade output
   resources/views/investor/show.blade.php:23

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Authorization Coverage: 132/147 (89.8%)
  Findings: 1 High ยท 1 Medium ยท 1 Low
  Scan time: 18.4s

Severity levels

SeverityMeaningAction
CriticalExploitable, likely data breachFix before merging
HighReal vulnerability, exploitable with contextFix before release
MediumVulnerability exists, exploitability variesFix within sprint
LowDefense-in-depth gapFix when convenient
InfoObservation onlyReview if needed