v1.2.0 — SARIF 2.1.0 Export
What's New
SARIF 2.1.0 Export
GuardianShield findings can now be exported as SARIF 2.1.0 JSON — the standard format for static analysis results used by GitHub Code Scanning, VS Code SARIF Viewer, and CI pipelines.
- New MCP tool:
export_sarif— scan code and return SARIF JSON in one call - New Python API:
findings_to_sarif()andfindings_to_sarif_json()for programmatic use - Compatible with
gh code-scanning upload-sariffor GitHub Advanced Security integration - Includes
partialFingerprintsfor cross-commit finding tracking - CWE taxonomies with rule relationships and security-severity scoring
Quick Start
from guardianshield import GuardianShield
from guardianshield.sarif import findings_to_sarif_json
shield = GuardianShield()
findings = shield.scan_code(code, file_path="app.py", language="python")
sarif = findings_to_sarif_json(findings, base_path="/project")
# Upload to GitHub Code Scanning:
# gh code-scanning upload-sarif --sarif=results.sarifStats
| Metric | v1.1.1 | v1.2.0 |
|---|---|---|
| MCP Tools | 21 | 22 |
| Tests | 1627 | 1707 |
| Dependencies | 0 | 0 |
Full Changelog: v1.1.1...v1.2.0