Skip to content

Commit d267daa

Browse files
committed
.builds: ignore buggy gosec warning
Currently gosec is throwing warnings for any defer statement that closes a file (even if the error is handled) due to a bug. Once securego/gosec#714 is fixed and a release has been made this patch can be reverted. Signed-off-by: Sam Whited <sam@samwhited.com>
1 parent dc9595d commit d267daa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.builds/validate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ tasks:
4646
staticcheck ./...
4747
# gosec does not handle modules correctly.
4848
# See: https://github.com/securego/gosec/issues/622
49-
gosec -exclude-dir=examples ./...
49+
# It also does not handle deferred close statements correctly (G307).
50+
# See: https://github.com/securego/gosec/issues/714
51+
gosec -exclude=G307 -exclude-dir=examples ./...
5052
5153
checkdoc -fileheader.pattern='-' ./... <<EOF
5254
Copyright \d\d\d\d The Mellium Contributors\.

0 commit comments

Comments
 (0)