Closed
Description
Summary
//#nosec G101
does not work in =v2.18.1
Steps to reproduce the behavior
Create new project
$ mkdir gosec-check && cd gosec-check
$ touch main.go
$ touch labels.go
$ touch go.mod
main.go
package main
import (
"fmt"
)
func main() {
fmt.Printf("Label: %s ", TokenLabel)
}
labels.go
package main
const TokenLabel = "test/linked-access-token" //#nosec G101 -- false positive, this is not a private data
go.mod
module example.com/m
go 1.21.3
gosec version
- 2.18.1 -github action
Go version (output of 'go version')
- from image
Operating system / Environment
- Github actions/docker image securego/gosec:2.18.1
Expected behavior
Line with #nosec G101 is not reported
Actual behavior
Line is reported as issue