-
Notifications
You must be signed in to change notification settings - Fork 41
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
Will the WG support both CPE (v2.3) as well as SWID Tags #28
Comments
I may be mistaken, but don't remember us taking the stance on using CPE explicitly, but I do remember we were more avoiding the usage of PURL because it was missing ranges/wildcards, here's the conversation from the original PR:
|
Yeah, its a good question @kerberosmansour. Personally I'm not a huge fan of either SWID or CPE (they're both very verbose and IMO don't really translate to open source, and particularly packaged OSS, that well). My thought was to just use the package ecosystem and name, and then a range of SemVers (which is also possible in the CVE v5 schema). |
Sounds good, I trust your judgement. Should we reach out to PURL team and work with them to provide ranges + wilder card for consideration later? |
Maybe? Would love to see this format get off the ground first so we have some justification for asking. |
Hi 👋 Version ranges (or more generally version constraints and that would include any wildcards or globs) are not an easy thing as there cannot be a universal definition since there is no universal way to represent and compare versions across all package types. To add them to PURL, we could either have a partly universal/partly type-specific approach or be entirely package type-specific. a partly universal/partly type-specific approach
an entirely package type-specific approach
IMHO the package type-specific approach is simpler, self-explanatory as it does not define any new notation and convention by reusing the package one and above all is always correct. Trying to define some universal notation has been something attempted in CPE and I am not sure this has been working OK. It would always be a compromise of sorts with some dark corners. The semantics differences of Python vs. Debian vs.RPM vs. Ruby vs. npm and semver are often minor but I think the details can matter a lot. In all the cases, the other item is about where to put this version range. I do not think it belongs to the Some ideas of what the semantics could be:
ping to package-url/purl-spec#66 |
@sbs2001 ping for you too since you pointed me to this ticket as part of your work on https://github.com/nexb/vulnerablecode :) |
Oh nice thanks for point that out @pombredanne - looks like @sbs2001 is trying to solve exactly the same problems! |
Also see SPDX and CycloneDX. All 3 (SWID, SPDX, CycloneDX) are candidate standards for the work going on in SBOM working group ( see: https://www.it-cisq.org/software-bill-of-materials/ ). A large amount of overlap between members of this working group, and the SBOM working group.... |
CPE is a requirement for commercial vendors to supply, so a group of us will always have to deal with it and its progeny. It looks like cpe will be deprecated in ~2 years, so we have until 2022ish to work with industry on what a viable replacement it. While SWID has "some" commercial support (mostly as a request by some public sector customers) it is far from decided yet what can/will replace cpe. I think if we came together and had a simple, reasonable approach that is broadly accepted in our communities we have a large ability to influence industry direction. |
@RedHatCRob Onè other aspect here I will raise, is there have been conversations surrounding SCAPV2 with some major stakeholders and a desire to move away from CPE and CCE there as well. Both are regarded as somewhat not fulfilling current needs. |
I'm migrating my comment from #17 I'm trying to put an advisory into json format to see what I think of the schema, here is my current content The versions are going to be the sticking point I suspect. In my case it's not even that complex I'm asking the purl crew if they have suggestions disclaimer: I really like purl I'm open to any other suggestions if anyone has any Thanks in advance |
Does anyone have a link or can explain what are the problems of CPE? What are the reasons NVD and other stakeholders want to drop it? I have found this link [1]. What it describes seems more a process problem than a technical problem with the specification. [1] https://www.veracode.com/blog/managing-appsec/using-cpes-open-source-vulnerabilities-think-again |
@fcanogab I think the blog you linked summarizes all the key issues with CPE quite nicely. It is not just a process problem, its a problem that partially originates with the format itself. CPE works OK for commercially produced software. It does not work well for shared libraries distributed by many vendors, and works horribly for rapidly evolving open source libraries. |
Hi @pombredanne Thinking about the versioning range a bit more I like the entirely package type-specific approach here are my thoughts on the subject. The problems that are attempted to be solved here are (AFAIK):
Now looking at @infin8x note the metadata provided would answer these questions. I would say to be pedantic we would want package ecosystem, name, Org (optional), and repo (optional). The reason why you would want to org and the artifact repo is sometimes a user who cares about a specific "vendor/OSS Foundation" software suite they'd like to search via that object. Also sometimes like in the case of some ecosystems or container images there isn't the one container image repo that everyone uses - the software that is leveraging the spec would need to know if it's not the default artifact repo to use. So for PURL to go down the entirely package type-specific approach it is till possible to achieve these goals for a few reasons:
So effectively you are shift solving the problem from the spec to the repo. This of-course assumes that the ecosystem has the ability to query release history in an automated way (but most do AFAIK). Worth a POC? |
CPE supports version ranges. SWID, to my knowledge, does not. Package-URL does not currently support version ranges, but it's not a crazy thing to ask for. I've already submitted a proposal to package-URL to add version ranges, here: There are complications (or this would already have been done), but I think they are solvable. If you think package-URLs should include a version range mechanism, please say so in that issue, and please help work out solutions to the problems raised there. |
Yeah... If you look at the CPE match string conditions they also include exceptions - it be nice if we have that as well. |
Done! replied to the other Issue. |
Hello, I noticed a line item in the meating notes: "Drop PURL in favor of the format used by CVE " which is fine given the package name + echo-system will be added.
However I wanted to clarify "which" format that is planing to be supported. NVD leverages CPE 2.3 currently (And plan to move to SWID at some point).
Can you confirm that the plan is to drop PURL in favour of CPE 2.3?
The text was updated successfully, but these errors were encountered: