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.
This commit is contained in:
Willie
2026-11-16 13:54:03 +08:00
parent 22fdb28de0
commit ffbddb608a
+1 -1
View File
@@ -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