Skip to content

Commit

Permalink
Merge pull request #138 from isimluk/gosec-ignore
Browse files Browse the repository at this point in the history
Ignore warning of the latest gosec tool
  • Loading branch information
redhatrises committed Oct 18, 2021
2 parents 854c6ab + fa27246 commit d5461e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/falcon_sensor_download/main.go
Expand Up @@ -101,7 +101,9 @@ func download(client *client.CrowdStrikeAPISpecification, sensor *models.DomainS
if err != nil {
panic(err)
}
/* #nosec */
defer func() {
// (ignore possibly false positive https://github.com/securego/gosec/issues/714)
if err := file.Close(); err != nil {
fmt.Fprintf(os.Stderr, "Error closing file: %s\n", err)
}
Expand Down

0 comments on commit d5461e5

Please sign in to comment.