Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore gosec G307 #2

Merged
merged 1 commit into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $(GOBIN)/golint:
@cd && go get golang.org/x/lint/golint

$(GOBIN)/gosec:
@cd && go get github.com/securego/gosec/v2/cmd/gosec@v2.8.1
@cd && go get github.com/securego/gosec/v2/cmd/gosec

.PHONY: cross
cross: $(GOBIN)/goxz ## build for cross platforms
Expand Down
1 change: 1 addition & 0 deletions pkg/m/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func (s3m S3Model) Download(object s3types.Object) (n int64, err error) {
if err != nil {
return 0, err
}
/* #nosec G307 */
defer func() {
if err := fp.Close(); err != nil {
panic(err)
Expand Down