-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Weird Behavior with C-Go projects #1244
Comments
I think there are some cgo issues, because some symbols cannot be found:
gosec doesn't work well with cgo packages. |
I see, thanks @ccojocar. |
I think this expansion is in the Go AST package which tries to resolve the cgo symbols. I would leave the bug open to try to investigate if we can do something to improve the situation. |
Closing this since there isn't much we can do on the gosec side. |
Summary
I'm relatively new to Go and have been learning as I go along. I noticed a potential issue with gosec and wanted to bring it to your attention. Please let me know if there's any additional information I can provide or if there's anything specific I should check.
When
gosec
is run on C-Go projects, it makes references to artifacts in the~/.cache/go-build
and sometimes the findings are not accurate.Steps to reproduce the behavior
gosec version
2.21.4
Go version (output of 'go version')
go version go1.23.2 linux/amd64
Operating system / Environment
RHEL8
Expected behavior
NA
Actual behavior
When you run it on
go-sqlite3
there are a lot of findings pointing to~/.cache/go-build
. But many a times the line references are to comments or braces. For e.g.:And so on....
For my use case, I'm leaning towards excluding the cache directory from the scanner. These findings in cache aren't really helpful cause we don't know the source in the project that led to it. What else can be done here?
Thanks!
The text was updated successfully, but these errors were encountered: