Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Eljakani/ward/llms.txt
Use this file to discover all available pages before exploring further.
What is Ward?
Ward understands your Laravel application — its routes, models, controllers, middleware, Blade templates, config files,.env secrets, Composer dependencies, and more. It doesn’t just grep for patterns. It resolves your project’s structure first, then runs targeted security checks against it.
Laravel gives you a lot out of the box — CSRF protection, Eloquent’s mass assignment guards, Bcrypt hashing, encrypted cookies. But it’s easy to misconfigure things or leave gaps that standard linters won’t catch.
Smart Analysis
Ward resolves your project structure first — parsing composer.json, .env, config files — then runs targeted checks against that context
Live CVE Database
Queries OSV.dev in real-time to check all Composer dependencies against the entire Packagist advisory database
40+ Security Rules
Built-in YAML rules covering secrets, SQL injection, XSS, debug artifacts, weak crypto, auth issues, and mass assignment
Custom Rules
Drop YAML files into ~/.ward/rules/ to add team-specific security checks with regex, substring, or file-exists patterns
What Ward Detects
Ward checks for common Laravel security issues that are easy to miss:APP_DEBUG=trueshipping to production- A controller action with no authorization check
$guarded = []on a model that handles paymentsDB::raw()with interpolated user input- Session cookies without the
Secureflag - An API route group missing
auth:sanctum - Outdated Composer packages with known CVEs
- Blade templates using
{!! !!}on user data
How It Works
Ward scans your project in a pipeline of five stages:composer.json, composer.lock, .env, and config/*.php to build a structured project context: framework version, PHP version, installed packages, environment variables, config files.
3. Scanners — Independent security checks run against the resolved context:
| Scanner | What it checks |
|---|---|
env-scanner | .env misconfigurations — debug mode, empty APP_KEY, non-production env, weak credentials, leaked secrets in .env.example |
config-scanner | config/*.php — hardcoded debug mode, session cookie flags, CORS wildcards, hardcoded credentials in config files |
dependency-scanner | composer.lock — live CVE lookup via OSV.dev against the entire Packagist advisory database (no hardcoded list, always up-to-date) |
rules-scanner | 40 built-in YAML rules covering secrets, SQL/command/code injection, XSS, debug artifacts, weak crypto, auth issues, mass assignment, unsafe file uploads |
Built for CI/CD
Ward fits into the workflow you already have — run it locally during development, or wire it into CI to gate deployments.Report Formats
Ward generates reports in multiple formats:- JSON — machine-readable baseline for CI integration
- SARIF — GitHub Code Scanning and IDE integration
- HTML — standalone visual report with dark theme
- Markdown — text-based, great for pull requests
Next Steps
Installation
Install Ward using go install or build from source
Quick Start
Run your first scan in under 2 minutes