-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/vuln: govulncheck does not match when using vulnerable symbol #55937
Comments
Thanks for reporting this. This is indeed an issue. My current quick analysis suggests that the issue appears because This is different from the case We will look into remedies for this. |
@zpavlinovic thanks for getting back to me so quickly, I'm never sure when using a new tool if it was just user error! This sounds like a tricky case. I wondered if a quick improvement would be to add |
Yes, the quickest fix would be to add functions/methods that immediately use |
No, I was just playing around with the new tool and happened to notice it. Thanks for looking into it! |
The fix was to add |
What version of Go are you using (
go version
)?Does this issue reproduce at the latest version of golang.org/x/vuln?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying to test the new
govulncheck
tool. As I'm lazy I looked at the first vulnerability and saw that it applies to uses ofgithub.com/gin-gonic/gin.defaultLogFormatter
at v1.5.0. Looking at the logger instance at the vulnerable version a call togin.Logger
should hit that symbol:https://github.com/gin-gonic/gin/blob/v1.5.0/logger.go#L183
Calls: https://github.com/gin-gonic/gin/blob/v1.5.0/logger.go#L204
Uses
defaultLogFormatter
: https://github.com/gin-gonic/gin/blob/v1.5.0/logger.go#L207Therefore I created this
main
func:And this go.mod:
Then I ran:
What did you expect to see?
I expected
GO-2020-0001
to be found in my application.What did you see instead?
GO-2020-0001
was listed as not applying to my application. I see in the vuln page for it that it says it is forAll symbols
even though the GitHub source says it is fordefaultLogFormatter
. Either way I would expect it to find it as my application usesdefaultLogFormatter
.The text was updated successfully, but these errors were encountered: