Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stefano Tondo <stondo@gmail.com>
To: Joshua Watt <JPEWhacker@gmail.com>
Cc: stefano.tondo.ext@siemens.com,
	Richard Purdie <richard.purdie@linuxfoundation.org>,
	Alexander Kanavin <alex.kanavin@gmail.com>,
	openembedded-core@lists.openembedded.org,
	bitbake-devel@lists.openembedded.org,
	Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
	Peter Marko <peter.marko@siemens.com>,
	Adrian Freihofer <adrian.freihofer@siemens.com>,
	Patrick Wicki <patrick.wicki@siemens.com>
Subject: Re: [RFC] spdx30: name, version and purl for dependency downloads
Date: Wed, 11 Nov 2026 12:58:45 +0100	[thread overview]
Message-ID: <20261111115845.1940227-1-stondo@gmail.com> (raw)
In-Reply-To: <CAJdd5GZTCwr9VE8OmOw7RAki+Xu+kokCgtOHG+9ghE3frWPbqg@mail.gmail.com>

On Tue, 10 Nov 2026 at 23:53, Joshua Watt <JPEWhacker@gmail.com> wrote:
> Perhaps, the better option would be to propagate the SRC_URI purls to
> the output packages, but apply some sort of (optional) filter that can
> remove a SRC_URI if it is not actually present in the output. That way,
> if we have positive confirmation that some input is not present in the
> output, we can remove its PURL from the output package (but, barring
> that, we include it).

Hi Joshua,

Thanks, that model makes sense to me. A purl stays unless there is
proof that the dependency is not in the output. For vulnerability
checks, that is the safer side.

The cargo prototype already works as that kind of filter.
cargo metadata --filter-platform resolves the dependencies for the
target. For python3-bcrypt, it gives the proof for 17 of the 42
crates: 5 are not used on the target, and 12 only run at build time
(build scripts and proc-macros). None of them end up in the binary,
so they lose their purl, and the 25 runtime crates keep it. For Go,
go version -m on each binary lists the modules compiled into it, so
it can give the same proof.

One question about the output side: how do you want the purls on the
output package? I see two options:

1. Add them to the externalIdentifier list of the output package, the
   way set_purls() handles SPDX_PACKAGE_URLS today.
2. Link the output package to the source download elements, which
   carry the purls, with a relationship such as contains.

Option 1 is simpler. But an external identifier says what the package
itself is, so a scanner can take python3-bcrypt for one of its crates.
Option 2 keeps each dependency as its own element. I prefer option 2,
unless you see a reason against it.

Thanks,
Stefano

  reply	other threads:[~2026-11-11 11:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 12:21 [RFC] spdx30: name, version and purl for dependency downloads Stefano Tondo
2026-11-05 20:26 ` Alexander Kanavin
2026-11-05 21:05   ` Stefano Tondo
2026-11-06 12:04     ` Alexander Kanavin
2026-11-06 12:17 ` [OE-core] " Richard Purdie
2026-11-10 21:59   ` Stefano Tondo
2026-11-10 22:53     ` Joshua Watt
2026-11-11 11:58       ` Stefano Tondo [this message]
2026-11-11 15:54         ` Joshua Watt
2026-11-11 15:48     ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111115845.1940227-1-stondo@gmail.com \
    --to=stondo@gmail.com \
    --cc=JPEWhacker@gmail.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=alex.kanavin@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=patrick.wicki@siemens.com \
    --cc=peter.marko@siemens.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=stefan.herbrechtsmeier@weidmueller.com \
    --cc=stefano.tondo.ext@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox