Summary
Add --format sarif output to hardbox audit and hardbox diff. Produces a SARIF 2.1.0 document compatible with GitHub Advanced Security code scanning and major SIEMs. Each finding maps to a SARIF result with rule metadata, severity, and remediation guidance.
Usage
# Audit and write SARIF output
hardbox audit --profile production --format sarif --output hardbox.sarif
# Upload to GitHub Advanced Security
gh codeql upload-results --sarif hardbox.sarif
SARIF mapping
| hardbox field |
SARIF field |
check.ID |
result.ruleId |
check.Title |
rule.shortDescription.text |
check.Description |
rule.fullDescription.text |
check.Remediation |
rule.help.text |
finding.Severity |
result.level (error/warning/note) |
finding.Detail |
result.message.text |
check.Compliance |
rule.properties.tags |
Severity mapping
| hardbox |
SARIF level |
| critical |
error |
| high |
error |
| medium |
warning |
| low |
note |
| info |
note |
Acceptance criteria
Summary
Add
--format sarifoutput tohardbox auditandhardbox diff. Produces a SARIF 2.1.0 document compatible with GitHub Advanced Security code scanning and major SIEMs. Each finding maps to a SARIFresultwith rule metadata, severity, and remediation guidance.Usage
SARIF mapping
check.IDresult.ruleIdcheck.Titlerule.shortDescription.textcheck.Descriptionrule.fullDescription.textcheck.Remediationrule.help.textfinding.Severityresult.level(error/warning/note)finding.Detailresult.message.textcheck.Compliancerule.properties.tagsSeverity mapping
errorerrorwarningnotenoteAcceptance criteria
--format sarifflag accepted byhardbox auditandhardbox diffresults; compliant findings omittedruns[].tool.driver.rulesrule.properties.tagsdocs/DEVSECOPS.mdupdated with SARIF CI/CD usage example