TheDocumentation 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.
ward scan command analyzes Laravel projects for security issues, misconfigurations, and vulnerabilities.
Usage
path argument can be:
- A local directory path (e.g.,
./my-laravel-app) - A Git repository URL (Ward will clone and scan it)
Output Modes
Ward supports two scan modes:Interactive TUI Mode (Default)
When running in a terminal with TTY support, Ward launches an interactive terminal UI with:- Real-time scan progress
- Organized findings by severity
- Detailed finding information
- Export options
Headless Mode
Activated when:- Using
--outputwith specific formats - Running in a non-TTY environment (CI/CD pipelines)
- No terminal is available
Options
Path to Laravel project directory or Git repository URL to scan
Output mode and formats. Use
tui for interactive mode, or comma-separated formats: json, sarif, html, markdownExamples:--output json- Generate JSON report only--output json,sarif,html- Generate multiple formats
Exit with code 1 if findings at or above this severity level are found.Valid values:
info, low, medium, high, criticalUseful for CI/CD pipelines to enforce security policies.Path to baseline file containing known findings to suppress.Ward will only report new findings not present in the baseline, helping you focus on newly introduced issues.
Save current scan findings as a new baseline file at the specified path.Use this to create or update a baseline after reviewing and accepting current findings.
Examples
Scan Local Project
Scan a Laravel project in the current directory:Scan Git Repository
Ward can clone and scan remote repositories:Generate JSON Report
Run headless scan with JSON output:Multiple Output Formats
Generate multiple report formats:Fail on High Severity
Exit with error code if high or critical findings are detected:Using Baselines
Create a baseline from current findings:CI/CD Pipeline Example
Combine flags for continuous integration:- Run in headless mode
- Generate JSON and SARIF reports
- Compare against baseline
- Fail the build if new high/critical issues are found
Exit Codes
- 0 - Scan completed successfully with no failures
- 1 - Scan found issues exceeding
--fail-onthreshold, or an error occurred
--fail-on flag makes Ward exit with code 1 when findings at or above the specified severity level are detected.