github.com/chenfeining/golangci-lint@v1.0.2-0.20230730162517-14c6c67868df/test/testdata/gosec_rules_config.go (about)

     1  //golangcitest:args -Egosec
     2  //golangcitest:config_path testdata/configs/gosec.yml
     3  package testdata
     4  
     5  import "io/ioutil"
     6  
     7  const gosecToken = "62ebc7a03d6ca24dca1258fd4b48462f6fed1545"
     8  const gosecSimple = "62ebc7a03d6ca24dca1258fd4b48462f6fed1545" // want "G101: Potential hardcoded credentials"
     9  
    10  func gosecCustom() {
    11  	ioutil.WriteFile("filename", []byte("test"), 0755) // want "G306: Expect WriteFile permissions to be 0666 or less"
    12  }