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

fix(vulnfeeds): be stricter about acceptable commits from URLs #3202

Merged

Conversation

andrewpollock
Copy link
Contributor

This tightens up what cves.Commit() considers acceptable by validating the assumed commit hash from GitHub and GitLab URLs as matching a SHA1 regex.

This prevents tags and tags with ancestry specification from being erroneously treated as a commit hash.

e.g.

as seen in the likes of CVE-2016-7141

This tightens up what `cves.Commit()` considers acceptable by validating
the assumed commit hash from GitHub and GitLab URLs as matching a SHA1
regex.

This prevents tags and tags with ancestry specification from being
erroneously treated as a commit hash.

e.g.
- curl/curl@curl-7_50_2
- curl/curl@curl-7_50_2~32

as seen in the likes of CVE-2016-7141
Copy link
Contributor

@jess-lowe jess-lowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very interesting! LGTM

@andrewpollock andrewpollock merged commit 9d48acd into google:master Feb 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants