News for hackers. Stuff that matters.

pombreda

Re:Understanding the PURL Specification (Package URL) on Saturday June 07, 2025 @10:28AM (#44209866)
You wrote:

> It's just a single line of text might not be enough to encode build configurations.

that's the tough part, and IMHO outside of PURL? ... Note that for C/C++ code ... @alcroito mentions cps in the same comment page at https://news.ycombinator.com/item?id=44196246 ... and a quick glance is that this attempts to capture these details may be?

So it could be a happy combo?

Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @09:07AM (#44200459)
:D
Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @09:04AM (#44200441)
Yeah, this is messed up! But tell me when you cannot locate a correct PURL?
Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @09:02AM (#44200428)
Actually, this is a locator alright. You can resolve a PURL to an actual package in an actual location.
Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @09:01AM (#44200414)
For "generic" interface-based dependencies, that's tougher.

This is a problem with a few ecosystems. OTH rpms, debs and Java OSGI... and may be a few more. We need to survey these to find if we can solve that and if this is a PURL problem at all.

Can I rope you in and interest you in filing an issue in the spec so we can move the discussion there? :P This would be great.

https://github.com/package-url/purl-spec/issues/

Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @08:56AM (#44200374)
We have a standard checksum "qualifier" at https://github.com/package-url/purl-spec/blob/main/PURL-SPEC... ... that would be the "hash" ... would this work?
Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @08:54AM (#44200365)
Good point, but that's may not be in scope either... since this is not even something you can get from Debian easily: not just looking at a Debian pool or diving into a package control files AFAIK?

Say I rebuild a Debian package with some new build options.

Is this a the same or a new package? I'd say a new one.

Is this the same name? I'd say a new one.

Is this distributed by Debian? Nope, so this comes from another repo and pool, right?

The idea with PURL is to have simple and short PURLs for the common case, and make it possible to handle less common cases. Rebuilding a package and sharing it on another repo would be a less common case to me? WDYT?

Re:Understanding the PURL Specification (Package URL) on Friday June 06, 2025 @08:48AM (#44200329)
let's chat. There is a really a lot of folks interesting because of the suffering! ABOUT is just a suggestion, and an TIL about cps and it looks awesome! [email protected] Or a comment on the issue or doc linked.
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:43PM (#44196073)
IMHO, a bare git stuff would be a git URL as specified in pip and SPDX and not a PURL... I would be interested to know more about your use case. Feel free to drop a note at [email protected]
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:41PM (#44196063)
Can you tell a bit more? What is this? The OP article?
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:34PM (#44196023)
All abstractions leak eventually, so we need that escape hatch IMHO. Otherwise you end up with the other issue which is that there are stuff you cannot track with PURL?
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:33PM (#44196010)
> distinguish between "fully qualified" PURLs and "partial" PURLs.

Can you tell a bit more? Not sure I get what you meant

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:31PM (#44196000)
> isn't the issue that sometimes a given scanner can't know from where the package is sourced?

That's the problem: there is no metadata with or in libssl.so.1 that I can reliably use to tell what this is

Eventually I can see a solution made of

1. create the metadata, say a simple YAMl or deb822 key-valud pair file that can then be included upstream or as an overlay 2. define a simple spec for binary formats to include a PURL (say in an ELF section or a WinPE string or sorts, where many of these are already stored) 3. create content-based tools like we have in PurlDB to match code, but may be more like a bunch of generated yara rules that would match symbols and strings from source to binaries and can recognize that libssl.so.1 is from OpenSSL 1.1.1g.

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:27PM (#44195962)
Yeah, I added generic as an escape hatch, but this should be only used by exception, e.g., a crutch. An abused crutch.

Eventually, let's fix this first for C/C++:

https://github.com/aboutcode-org/www.aboutcode.org/issues/30

And based on that approach we can either: 1. create new, sensible types as needed 2. and/or maintain a last resort open registry of generic types at least so we get some sanity in the process.

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:22PM (#44195936)
Is this about Maven "groupid" mapped to a namespace? "com.foo.bar" is Maven's own invention and notation.... in most cases we are just trying to adopt the ecosystem convention to minimize fictions.
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:21PM (#44195923)
Not sure I parse... do you mind to elaborate?
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:20PM (#44195915)
Yeah, the CPE idea of a vendor for an open source package does not compute too well!

FWIW, PURL came about as I could NOT put my mind around CPEs when I was scanning for package and deps with scancode and could not find any easy way to go from that to looking up a vulnerability/CVE in the NVD, as it was all guesswork and manual.

So we started instead to put the vuln data in our own db, keyed by something that would be easy to relate from the scans. This eventually became PURL

This is all tracked in these places: - The original issue: https://github.com/aboutcode-org/scancode-toolkit/issues/805 - The initial pull request with many comments: https://github.com/package-url/purl-spec/pull/1

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:13PM (#44195848)
This is awesomely nice!
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:12PM (#44195839)
You wrote:

> So to the more knowledgeable people out there, what is the PURL way of identifying a C++ library like that?

That's a blind spot. This is a real problem for every as you rightfully explained.

So I have been thinking a lot about how to track C/C++ native libraries, and I have been working on a plan to deal with this.

You can read a summary there (that I just posted to supply this discussion!) - https://github.com/aboutcode-org/www.aboutcode.org/issues/30

And this comment links to more detailed work-in-progress planning doc: - https://github.com/aboutcode-org/www.aboutcode.org/issues/30...

If you want to chip in and help, this would be awesome.

And IMHO, aligned with your thinking this should not be tied to a build system or a for-profit operation like conan.io, or a linux distro, or for that matter a specific build tool or approach as they are so many, and be self-hosted, easy to sync, and simple to store in a git repo.

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @05:01PM (#44195742)
Note that there should be a gitlab type as it is planned for: https://github.com/package-url/purl-spec/blob/a90ee02679afc3...

gitlab and github do provide package-like discoverability. Do you have a pointer that says a github package is a mistake?

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @02:14PM (#44194213)
Not at all related. Just nicknamed the same.
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @02:08PM (#44194140)
We maintain the spec at https://github.com/package-url/purl-spec

And the new thing, working towards making it a real standard with Ecma https://tc54.org/purl/ ... :)

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:55PM (#44194018)
Actually, I also used it when I first presented PURL at FOSDEM in 2018 https://archive.fosdem.org/2018/schedule/event/purl/ .... scroll the video at 9 minutes :] We need moooaaar standards, do we?
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:50PM (#44193986)
That's actually the best explanation I have seen in a long time!

- in most cases, no guesses needed - you can use it in Cyclone, SPDX, and CSAF and still talk about the same package even if the format varies - CVE.org is considering it as an addition on the same footing as CPE - there a good bunch of databases that "speak" PURL, like Google OSV, Sonatype OSS Index, Deps.dev, and AboutCode's PurlDB and VulnerableCode (disclosure: I am a lead maintainer for AboutCode FOSS projects) - most scanners speak PURL too.

Note that same scanners and tools speak not exactly PURL but some "PURLish" dialect and we have a project to help streamline that and lift up the whole ecosystem of PURL users with https://nlnet.nl/project/purlvalidator/

Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:45PM (#44193942)
This is not a valid PURL as it is missing a type, assuming you wanted golang here.

It could be instead:

    pkg:golang/github.com%2Ffoobar%2Fgo-whatnot
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:43PM (#44193927)
Agreed. In hindsight, I always wonder if this was a good idea to have this split. At least the namespace is optional and required only certain package types
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:39PM (#44193884)
You want to avoid the "generic" type... and for docker containers and OCi images that's not needed.
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:37PM (#44193870)
Disclosure: I created that spec and we are working hard to clarify it and remove grey areas!
Re:Understanding the PURL Specification (Package URL) on Thursday June 05, 2025 @01:36PM (#44193865)
Encode the slash as explained in the clarified spec https://github.com/package-url/purl-spec/pull/453 :)

We are working on further clarifying Golang which a bit problematic: there is really no name or namespace in Go, just a path, and it is not possible at scale to tell when a Go module stops and when a Go package starts just by looking at the path... this is going to be clarified after the merge of the PR 453.

Re:Free and open source software projects are in transition on Wednesday August 02, 2023 @03:15AM (#36967956)
You should not do FOSS if you do not want to make a gift, with few strings attached --if any. Use a proprietary license instead :]

Older ยป