News for hackers. Stuff that matters.
Re:Understanding the PURL Specification (Package URL) by donenext on Thursday June 05, 2025 @04:31PM (#44195500)
Hot take, `generic` as a type is a crutch most tooling uses out of laziness and has significantly reduced the usefulness of PURL spec. How do we improve this?
Re:Understanding the PURL Specification (Package URL) by pombreda 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) by jessoteric on Thursday June 05, 2025 @04:33PM (#44195524)
isn't the issue that sometimes a given scanner can't know from where the package is sourced?

like if I'm scanning an arbitrary linux system, and I see `libssl.so.1` but I don't see it in the local package manager, I don't really have an option other than to call it generic.

I do agree that "generic" seems to be WAY overused though. Maybe tools that report on SBOMs, like FOSSA or whatever, should emit warnings to users about "generic" PURLs.

Re:Understanding the PURL Specification (Package URL) by pombreda 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) by donenext on Thursday June 05, 2025 @04:42PM (#44195586)
Thats fair. It just seems silly that a spec intended to "uniquely ID a package" supports a type that is the complete opposite of "unique". I guess another way to frame my take is should `generic` be consider a valid PURL? Keep it as a fall back sure, but distinguish between "fully qualified" PURLs and "partial" PURLs.

This then gives tooling a path to prompt users to provide missing context needed to fully qualify the PURL

Re:Understanding the PURL Specification (Package URL) by pombreda 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) by jessoteric on Thursday June 05, 2025 @05:57PM (#44196168)
That seems like a good idea... hmm.
Re:Understanding the PURL Specification (Package URL) by donenext on Thursday June 05, 2025 @04:32PM (#44195508)
Can we completely eliminate generic as a type to remove this crutch?
Re:Understanding the PURL Specification (Package URL) by pombreda 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?