/guardx:report — Generate an HTML, SARIF, JUnit XML, or PDF report
Generate comprehensive reports in multiple formats from scan results.
Trigger
User invokes /guardx:report or asks to "generate a report", "export findings", "create an HTML report", "export SARIF for GitHub", "export JUnit XML", or "generate a PDF report".
Steps
-
Determine the source:
- If the user provides a scan ID (from
/guardx:history), useid. - If the user has a raw scan result in the current conversation, use
result. - If neither, call
list_scan_historyand ask the user to pick a scan.
- If the user provides a scan ID (from
-
Determine the format:
- Ask: "Which format?
- HTML — human-readable report, open in a browser
- SARIF — GitHub Security tab / CI integration
- JUnit XML — Jenkins, SonarQube, Azure DevOps
- PDF — leadership briefing or compliance audit sign-off"
- Default to
htmlif the user does not specify.
- Ask: "Which format?
-
Call the
generate_reportMCP tool:Tool: generate_report Arguments: id: <scan id> # if loading from history result: <ScanResult> # if using inline result format: "html" | "sarif" | "junit" | "pdf" -
Report the output:
- Tell the user the file path where the report was written.
- HTML: "Open the file in your browser to view the full report."
- SARIF: "Upload this file to GitHub — go to Security → Code scanning → Upload SARIF, or add it to your CI pipeline."
- JUnit XML: "Add this file to your Jenkins/SonarQube/Azure DevOps pipeline as a test result artifact."
- PDF: "Open this file in any PDF viewer. Suitable for leadership briefings and compliance audit sign-off."
Format Details
HTML
Self-contained HTML report with:
- Vulnerability rating badge
- Findings with severity colour-coding
- Defense profile
- Recommendations
- Scan stats
SARIF 2.1.0
Integrates with:
- GitHub Security tab (Code scanning alerts)
- VS Code SARIF Viewer extension
- Jenkins / SonarQube via plugin
JUnit XML
Integrates with:
- Jenkins (test results trend)
- SonarQube (quality gate)
- Azure DevOps (test publishing)
4-section report:
- Cover page — scan ID, date, overall vulnerability rating
- Executive Summary — rating, findings by severity, top 3 recommendations
- Findings Detail — technique, category, severity, extracted content, evidence
- Remediation Checklist — prioritised
[ ]items grouped by severity
Notes
- Reports are saved to
.guardx/reports/which is gitignored — they stay local. - Run
/guardx:historyfirst if you need to find the scan ID.