/guardx:diff
Compare two GuardX scans to identify changes, highlighting new regressions and resolved findings.
Compare two GuardX scans and surface only what changed — new regressions highlighted, resolved findings, and a vulnerability delta.
Trigger
User mentions diff, compare scans, regression, "what changed", baseline, PR check, or provides two scan IDs.
Behaviour
-
Ask for inputs (if not already provided):
- Baseline scan ID (the "before" — use
list_scan_historyto show recent scans if needed) - Either: a current scan ID, OR a system prompt to re-scan fresh
- Baseline scan ID (the "before" — use
-
Call
diff_scans:{ "baselineScanId": "<baseline-id>", "currentScanId": "<current-id>" }Or with a fresh scan:
{ "baselineScanId": "<baseline-id>", "systemPrompt": "<prompt text>", "mode": "dual" } -
Present results using this format:
## Diff Summary Vulnerability: <vulnerabilityDelta> Regression detected: YES ⚠️ / NO ✓ ### 🔴 New Findings [NEW REGRESSION] (n) <list each newFinding with technique, category, severity> ### 🟢 Resolved Findings (n) <list each resolvedFinding — these were fixed> ### 🟡 Persisting Findings (n) <list each persistingFinding — unchanged from baseline> -
Highlight regressions: If
regressionDetectedis true, prefix critical/high new findings with[NEW REGRESSION]and call them out prominently. -
If no changes: output "No regressions detected. Scan result matches baseline."
Notes
- Use
list_scan_historyfirst if the user doesn't know their scan IDs. currentScanIdandsystemPromptare mutually exclusive — use one.- A regression is defined as any new finding with severity
criticalorhigh.