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

Newly introduced G602 rule slows down the execution significantly #1010

Closed
rabadin opened this issue Sep 6, 2023 · 0 comments · Fixed by #1017
Closed

Newly introduced G602 rule slows down the execution significantly #1010

rabadin opened this issue Sep 6, 2023 · 0 comments · Fixed by #1017

Comments

@rabadin
Copy link

rabadin commented Sep 6, 2023

Just to illustrate the problem I'm testing this on a checkout of https://github.com/kubernetes/kubernetes.

Using gosec v2.17.0 to scan a package from the kubernetes repo takes 0m49.899s.
Using gosec v2.16.0 to scan the same package takes 0m1.764s.
Using gosec v2.17.0 to scan the same package excluding G602 takes 0m1.748s.

$ go install github.com/securego/gosec/v2/cmd/gosec@v2.17.0
$ time ~/go/bin/gosec ./staging/src/k8s.io/api/core/v1/
[...]
Summary:
  Gosec  : dev
  Files  : 14
  Lines  : 88306
  Nosec  : 0
  Issues : 12


real	0m49.899s
user	1m25.262s
sys	0m2.669s
$ go install github.com/securego/gosec/v2/cmd/gosec@v2.16.0
$ time ~/go/bin/gosec ./staging/src/k8s.io/api/core/v1/
[...]
Summary:
  Gosec  : dev
  Files  : 14
  Lines  : 88306
  Nosec  : 0
  Issues : 12


real	0m1.764s
user	0m3.564s
sys	0m0.674s
$ go install github.com/securego/gosec/v2/cmd/gosec@v2.17.0
$ time ~/go/bin/gosec -exclude=G602 ./staging/src/k8s.io/api/core/v1/
[...]
Summary:
  Gosec  : dev
  Files  : 14
  Lines  : 88306
  Nosec  : 0
  Issues : 12


real	0m1.748s
user	0m3.565s
sys	0m0.738s
@rabadin rabadin changed the title Newly introduced G602 rule slows down the execution time significantly. Newly introduced G602 rule slows down the execution significantly Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant