mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
fix: filepaths with git anywhere in them being erroneously excluded (#828)
Co-authored-by: Tim Costa <timcosta@amazon.com>
This commit is contained in:
parent
602ced7e71
commit
9a25f4ed2d
1 changed files with 2 additions and 2 deletions
|
@ -306,9 +306,9 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", "vendor")
|
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", "vendor")
|
||||||
}
|
}
|
||||||
err = flag.Set("exclude-dir", ".git")
|
err = flag.Set("exclude-dir", "\\.git/")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", ".git")
|
fmt.Fprintf(os.Stderr, "\nError: failed to exclude the %q directory from scan", "\\.git/")
|
||||||
}
|
}
|
||||||
|
|
||||||
// set for exclude
|
// set for exclude
|
||||||
|
|
Loading…
Reference in a new issue