-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.UXIssues that involve UXD/UXR inputIssues that involve UXD/UXR inputvulncheck or vulndbIssues for the x/vuln or x/vulndb repoIssues for the x/vuln or x/vulndb repo
Milestone

Description
Report ID
GO-2022-1039
Suggestion/Comment
The content of the warning is:
calls regexp.MustCompile, which eventually calls regexp/syntax.Parse
My code does indeed call MustCompile
, but all of the non-test call sites pass in a literal string to the regex. As such, the call is trusted. If I undestand this vulnerability report correctly, it effectively means we can't ever use regexes and get a clean bill of health from govulncheck
.
package main
import (
"fmt"
"regexp"
)
var re = regexp.MustCompile("trusted")
func main() {
fmt.Println(re.String())
}
Jorropo
Metadata
Metadata
Assignees
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.UXIssues that involve UXD/UXR inputIssues that involve UXD/UXR inputvulncheck or vulndbIssues for the x/vuln or x/vulndb repoIssues for the x/vuln or x/vulndb repo