Skip to content

Commit 8317ed2

Browse files
itcmsgrclaude
andcommitted
fix(ci): add -nosec flag to gosec for SARIF #nosec annotation support
Without -nosec, gosec includes all findings in SARIF output even when #nosec annotations are present in code. The -nosec flag tells gosec to honor inline suppressions in SARIF mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c372280 commit 8317ed2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/secure-go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: go install github.com/securego/gosec/v2/cmd/gosec@v2.22.0
9696

9797
- name: Run gosec (SARIF)
98-
run: $(go env GOPATH)/bin/gosec -fmt sarif -out gosec.sarif ./... || true
98+
run: $(go env GOPATH)/bin/gosec -nosec -fmt sarif -out gosec.sarif ./... || true
9999

100100
- name: Fix gosec SARIF relationships
101101
run: |

0 commit comments

Comments
 (0)