-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Description
Background: I'm a Software Security consultant, but not a Go expert. Just learning Go.
What version of Go are you using (go version)?
$ go version go version go1.13.1 darwin/amd64 (i.e., MacOS)
Does this issue reproduce with the latest release?
I believe I'm using the latest version of Go.
What did you do?
I ran a free Go tool called ineffassign (from: https://github.com/gordonklaus/ineffassign) and noticed it pointed out some issues in the go libraries themselves. I asked Gordon Klaus to review them and his response was: "Some of those are harmless (if sloppy), but others look like they might be real bugs. I think they're worth reporting at golang.org/issues."
What did you expect to see?
No issues pointed out in Go libraries by this tool.
What did you see instead?
I ran ineffassign on a Go app I'm doing a security review for and noticed these results as part of the output:
mpapp/vendor/golang.org/x/text/collate/build/colelem.go:205:5: ineffectual assignment to p
mpapp/vendor/golang.org/x/text/collate/maketables.go:449:4: ineffectual assignment to d
mpapp/vendor/golang.org/x/text/transform/transform.go:146:5: ineffectual assignment to err
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:489:5: ineffectual assignment to preceedingCharacterType
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:565:4: ineffectual assignment to i
mpapp/vendor/golang.org/x/text/unicode/bidi/core.go:644:4: ineffectual assignment to i
mpapp/vendor/golang.org/x/text/unicode/cldr/resolve.go:486:7: ineffectual assignment to err
These look like part of Go itself, so I find them interesting. Do you think these are real issues that need to be reported to the maintainers of Go? Or false positives? (Gordon said report them, so here they are.)