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

cmd/vet: false negative in vet -shadow #19597

Closed
mcandre opened this issue Mar 17, 2017 · 2 comments
Closed

cmd/vet: false negative in vet -shadow #19597

mcandre opened this issue Mar 17, 2017 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mcandre
Copy link

mcandre commented Mar 17, 2017

What version of Go are you using (go version)?

$ go version
go version go1.7 darwin/amd64

What did you do?

go tool vet -shadow finds one shadow for the hash variable, but fails to notice the password shadow.

Source:

https://github.com/mcandre/go-ios7crypt/blob/61a282b2d8003e9372cbe37449c7008ee142f1fa/cmd/ios7crypt/main.go#L29-L43

Perhaps the shadow checker bombs out on the first occurrence, before it has a chance to scan the rest of the file?

@ALTree ALTree changed the title False negative in vet -shadow cmd/vet: false negative in vet -shadow Mar 18, 2017
@ALTree ALTree added this to the Unplanned milestone Mar 18, 2017
@robpike
Copy link
Contributor

robpike commented Mar 18, 2017

The shadow tool is very weak and has many known bugs. I'll leave this open but don't expect a fix. A likelier resolution is a complete replacement of the checker.

@agnivade agnivade added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 23, 2019
@mvdan
Copy link
Member

mvdan commented Sep 13, 2019

go vet has been rewritten since this issue was opened, and the shadow check is no longer available via a flag. It can still be installed, but manually from x/tools; see https://go-review.googlesource.com/c/go/+/154584/.

Given that the check never made it out of the "experimental" phase, and that it's no longer part of vet, and that noone plans to fix this issue in particular, I'm closing it for now.

@mvdan mvdan closed this as completed Sep 13, 2019
@golang golang locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants