From ffbddb608a5d1192ec2584086b6051dd9fac266a Mon Sep 17 00:00:00 2001 From: Willie Date: Mon, 16 Nov 2026 13:54:03 +0800 Subject: [PATCH] chore(audit): name the SARIF rule index key correctly The map has been keyed by ruleID, with Pattern only as a fallback, since rule IDs were introduced; the comment still said pattern. --- internal/audit/sarif.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/audit/sarif.go b/internal/audit/sarif.go index 9f79c1e01..2c70373c4 100644 --- a/internal/audit/sarif.go +++ b/internal/audit/sarif.go @@ -108,7 +108,7 @@ type SARIFOptions struct { // It deduplicates rules by ID, records their maximum severity, and maps each // Finding to a sarifResult with the correct ruleIndex. func ToSARIF(results []*Result, opts SARIFOptions) *sarifLog { - ruleIndex := map[string]int{} // pattern → index in rules slice + ruleIndex := map[string]int{} // ruleID → index in rules slice var rules []sarifReportingDesc var sarifResults []sarifResult var coverage []map[string]any