Ward’s main configuration file is located atDocumentation 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/config.yaml. It controls severity filtering, output formats, scanner behavior, rule overrides, AI settings, and source provider options.
Configuration Structure
The configuration file is generated when you runward init and contains the following sections:
Configuration Options
Top-Level Options
Minimum severity level to report. Findings below this threshold are filtered out.Valid values:
info, low, medium, high, criticalExample: Setting severity: medium will only report Medium, High, and Critical findings.Output Configuration
Controls report generation formats and output directory.List of report formats to generate. Ward will create a separate file for each format.Valid formats:
json— Machine-readable JSON (always generated as baseline)sarif— SARIF 2.1.0 format for GitHub Code Scanning and IDEshtml— Standalone visual report with dark thememarkdown— Text-based report, great for pull requests
Output directory for generated report files. Relative to the scanned project root.Example:This will write files like
./reports/ward-report.json, ./reports/ward-report.sarif, etc.Scanners Configuration
Controls which security scanners are enabled.Explicit list of scanners to enable. If empty, all scanners run by default.Available scanners:
env-scanner—.envmisconfigurationsconfig-scanner—config/*.phpsecurity issuesdependency-scanner— CVE lookup via OSV.devrules-scanner— YAML-based pattern rules
List of scanner names to skip. Useful for disabling specific scanners without changing the enable list.Example:
Rules Configuration
Controls rule loading, overrides, and custom rule directories.List of rule IDs to completely disable. These rules will not run during scans.Example:
Map of rule IDs to override settings. Allows changing severity or disabling specific rules without editing rule files.Override options:
severity— Change the rule’s severity levelenabled— Disable the rule (alternative todisablelist)
Additional directories to load rules from. Ward always loads rules from
~/.ward/rules/, and this option lets you add team-wide or project-specific rule directories.Example:Providers Configuration
Controls source provider behavior (local filesystem and git).Shallow clone depth for git repositories. Set to
1 for fastest clones (only latest commit), or 0 for full history.Example:AI Configuration
Controls AI-assisted scanning features (experimental).Enable or disable AI-assisted scanning.Example:
AI provider to use for assisted scanning.Valid providers:
openai, anthropic, ollamaExample:Model name to use for the selected provider.Example:
API key for the AI provider. Can also be set via the
WARD_AI_API_KEY environment variable.Example:Custom endpoint URL for self-hosted models or alternative API endpoints.Example:
Default Configuration
When you runward init, the following default configuration is created:
config.yaml
Configuration Loading
Ward loads configuration in the following order:- Default values — Built-in defaults from the source code (internal/config/config.go:59-78)
- Config file —
~/.ward/config.yamlif it exists - Environment variables —
WARD_AI_API_KEYoverridesai.api_key - CLI flags — Command-line flags override config file settings
CLI Overrides
Some configuration options can be overridden via command-line flags:Related Pages
- Custom Rules — Writing your own security rules
- Output Formats — Detailed format documentation
- Rule Overrides — Disabling and customizing rules