Skip to content

Commit 5687163

Browse files
committed
fix null handle
1 parent df2ff76 commit 5687163

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

utils/sarif.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ func FilterRulesFromSarif(sarifData []byte) ([]byte, error) {
243243
if runMap, ok := run.(map[string]interface{}); ok {
244244
if tool, ok := runMap["tool"].(map[string]interface{}); ok {
245245
if driver, ok := tool["driver"].(map[string]interface{}); ok {
246-
if _, exists := driver["rules"]; exists {
247-
driver["rules"] = nil
248-
}
246+
// Always set rules to null to maintain consistent output format
247+
driver["rules"] = nil
249248
}
250249
}
251250
}

0 commit comments

Comments
 (0)