Ward generates security reports in multiple formats to suit different workflows. Configure output formats inDocumentation 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 or override via the --output CLI flag.
Supported Formats
Ward supports four output formats:| Format | File | Use Case |
|---|---|---|
| JSON | ward-report.json | Machine-readable, CI/CD pipelines, baseline generation |
| SARIF | ward-report.sarif | GitHub Code Scanning, IDE integration, SAST tools |
| HTML | ward-report.html | Visual review, stakeholder reports, browser viewing |
| Markdown | ward-report.md | Pull requests, documentation, text-based review |
JSON is always generated as a baseline, even if not explicitly configured. All other formats are optional.
Configuration
Configure output formats in~/.ward/config.yaml:
config.yaml
CLI Override
Override formats for a single scan:JSON Format
File:ward-report.jsonImplementation: internal/reporter/json.go Machine-readable JSON format for programmatic consumption, CI/CD pipelines, and baseline generation.
Structure
Use Cases
- CI/CD pipelines — Parse findings and fail builds based on severity
- Baseline generation — Use with
--update-baselineand--baselineflags - Automated reporting — Feed into dashboards or ticketing systems
- API integration — Consume findings in external tools
Example: Parse in CI
SARIF Format
File:ward-report.sarifImplementation: internal/reporter/sarif.go
Spec: SARIF 2.1.0 Static Analysis Results Interchange Format (SARIF) is an industry-standard JSON format for static analysis tools. Designed for integration with GitHub Code Scanning, IDEs, and SAST platforms.
Structure
Severity Mapping
Ward severity levels map to SARIF levels as follows (internal/reporter/sarif.go:118-142):| Ward Severity | SARIF Level | SARIF Security Severity |
|---|---|---|
| Critical | error | critical |
| High | error | high |
| Medium | warning | medium |
| Low | note | low |
| Info | note | informational |
Use Cases
GitHub Code Scanning
Upload SARIF reports to GitHub Code Scanning for inline security annotations:.github/workflows/ward.yml
IDE Integration
Many IDEs (VS Code, JetBrains) can display SARIF results inline. Use the SARIF Viewer extension or built-in SARIF support.SAST Platform Integration
SARIF is supported by most SAST platforms (SonarQube, Checkmarx, etc.) for importing third-party scan results.HTML Format
File:ward-report.htmlImplementation: internal/reporter/html.go Standalone HTML report with dark theme, interactive collapsible findings, and visual severity breakdown.
Features
- Dark theme — Optimized for readability with custom dark color scheme
- Sidebar navigation — Jump to categories and findings
- Collapsible details — Expand findings to see code snippets and remediation
- Severity breakdown — Visual bar chart and stat cards
- Self-contained — No external dependencies, works offline
- Print-friendly — CSS print styles for PDF export
Screenshot
Use Cases
- Stakeholder reports — Share visual reports with non-technical stakeholders
- Browser review — Open in browser for quick visual inspection
- PDF export — Print to PDF for archival or compliance
- Offline viewing — No server required, works from filesystem
Example: Generate and Open
Markdown Format
File:ward-report.mdImplementation: internal/reporter/markdown.go Text-based report with GitHub-flavored Markdown. Perfect for pull request comments, documentation, and text-based review.
Structure
Use Cases
- Pull request comments — Paste findings into PR descriptions
- Documentation — Include in security runbooks or wikis
- Text review — Review in terminal with
lessorcat - CI logs — Readable in plain-text CI logs
Example: Post to PR
Output Directory
All report files are written to the configured output directory:config.yaml
Headless Mode
When--output is specified or no TTY is detected, Ward runs in headless mode:
- No interactive TUI
- Styled text output to stderr
- Report files written to configured directory
- Exit code based on
--fail-onthreshold
Related Pages
- Configuration File — Configure default output formats
- CI Integration — Using reports in CI/CD pipelines
- Baseline Management — Using JSON reports for baseline suppression