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.
Quickstart
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
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.
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 }}
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
composer.json.
System requirements
| Requirement | Minimum | Notes |
|---|---|---|
| Node.js | 18.x | Required for npm install |
| PHP | 8.1 | Required to scan PHP projects |
| Git | Any | For diff-aware CI scanning |
Your First Scan
When you run havoc scan, HAVOC:
- Detects your framework from
composer.json - Parses PHP files into an AST
- Runs all 15 analyzers
- Deduplicates findings
- Calculates authorization coverage %
- 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.
| Analyzer | Looks for |
|---|---|
| Authorization Coverage | Controller actions reachable without a policy, Gate or authorization middleware. |
| Mass Assignment | Eloquent models that accept attributes they should not, including privilege-bearing columns. |
| SQL Injection | Raw SQL built from user-controlled input, rather than parameterised. |
| XSS Surface | Unescaped Blade output that can carry user-controlled data into the page. |
| IDOR | Nested parent/child routes whose handler does not establish ownership of the child. |
| Privilege Escalation | Paths where a user could grant themselves or others elevated roles or permissions. |
| Credential Exposure | Secrets committed in tracked source, and configuration that leaks in production. |
| Session Security | Session and cookie configuration that weakens session and CSRF defences. |
| File Upload | Uploads accepted without type or size constraints, or written where they can be served back. |
| Rate Limiting | Routes with no throttle, weighted toward authentication and state-changing requests. |
| Encryption at Rest | Sensitive columns stored without encryption. |
| Insecure Deserialization | Deserialization of user-controlled data, which can lead to object injection. |
| Open Redirect | Redirects whose destination comes from unvalidated user input. |
| Security Headers | Missing response headers for clickjacking, MIME sniffing and transport security. |
| Dependency Audit | Composer 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
| Severity | Meaning | Action |
|---|---|---|
| Critical | Exploitable, likely data breach | Fix before merging |
| High | Real vulnerability, exploitable with context | Fix before release |
| Medium | Vulnerability exists, exploitability varies | Fix within sprint |
| Low | Defense-in-depth gap | Fix when convenient |
| Info | Observation only | Review if needed |