-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
proposal: standardize on marking versions as vulnerable #29537
Comments
I think this conversation is probably best added to #24031? |
I think #24031 is a subset of the problems this proposal is an attempt to solve |
I would love to see this, it's really hard to tell what is vulnerable where. My only qualm is it requires opt-in from the repository maintainers and I'm honestly not sure how many would do that. I'd love to see some system where CVE's can be centrally referenced to identify vulns in a similiar system. EDIT: after thinking, it may make sense to put this metadata instead an annotated tag for the release instead of using a whole tag. This would allow do you do something in release 1, say:
And follow up later with something like:
|
Damn. That's an incredible idea |
OK. I've looked into it and while tag annotations are great in that they can be GPG signed and have authorship etc, one can't append an annotation to an existing tag. It'd frankly be incredible if a go user could append a mark saying that the tag is vulnerable to something, but I don't think this concept of accumulating data in a single tag is well supported. I'll add it to the other options for feedback. Maybe someone has a workaround |
Yes, you're more likely to get traction by adding your suggestion to #24031 rather than opening a duplicate issue here. |
Anything that relies on |
why?
this would be metadata under the module proxy protocol. as it says in the docs, the metadata is intended to be expanded |
Not everyone distributes through git. (The Go command itself supports several different VCS systems plus the module proxy protocol.) |
I still don't understand. As we both know, the Go modules system is the accepted way forward for Go package versioning. My proposal is virtually identical in implementation to the versioning system the Go modules system uses, which also relies on tagging to attach metadata. If these tags were not portable, we could not be having this conversation about compatibility in the first place! |
The only current tag syntax we require tools to support is the semver.org syntax with the |
At any rate, I think this discussion is getting too fragmented. Let's consolidate into #24031. |
here's the list of supported VCS: // vcsList lists the known version control systems
var vcsList = []*Cmd{
vcsHg,
vcsGit,
vcsSvn,
vcsBzr,
} Git, as we know supports these.
SVN uses a tag including spaces as the canon example of creating tags: $ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/tags/release-1.0 \
-m "Tagging the 1.0 release of the 'calc' project."
Committed revision 902. However, bazaar doesn't support spaces in tags:
I propose, then that dashes, '-' instead of spaces may be used. This falls in line with how bazaar separates spaces in their examples. I'll alter the proposal |
OK. I'll put my proposal there. |
this comment now supersedes this proposal |
Abstract
Go modules have been extremely useful for dependency analysis. We need a way of marking certain revisions as vulnerable so that they can be picked up by tooling and patched appropriately. In other languages, this is something that is done at worst by parsing natural language CVE disclosures. I hope to do better than this :)
My proposal is to introduce two git tag forms, which look like:
vulnerability CVE-2018-0001 in v1.0.1
for findings andfix vulnerability CVE-2018-0001 in v1.0.2
for fixes. Packages that do not have versions work viago.mod
versions:vulnerability CVE-2018-0001 in v0.0.0-20180517173623-c85619274f5d
.I think this would be a huge boon to Go security overall. I expect my proposal won't be perfect and I welcome feedback.
Proposal
See also: go mod version definition.
NB: as go.mod versions do not require annotated semver version tags, this system also works with repos that only have git refs.
tag:
vulnerability [identifier] in [go mod version]
Used to mark a go mod version as having some security bug. The identifier is expected to be unique -- it could, for example be a CVE ID or a JIRA ticket ID.
The tag is expected to be on the first ref known to be vulnerable.
tag:
fix vulnerability [identifier] in [go mod version]
Used to mark a go mod version as not vulnerable to a security bug. The unique identifier is said to be fixed.
The tag is expected to be on the first ref known to introduce a fix.
Determining if a version is vulnerable
fix vulnerability
tags that are before the go mod version, collect their identifiers.vulnerability
tags that are before the go mod version and whose identifiers are not in thefix vulnerability
set.EBNF sketch
Other ideas I'd like feedback on
[HIGH]
[LOW]
etc CVSS score annotations?The text was updated successfully, but these errors were encountered: