Skip to content
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

clarify maven-central as storage, not maven #24

Open
wants to merge 3 commits into
base: sboms
Choose a base branch
from

Conversation

hboutemy
Copy link
Member

@hboutemy hboutemy commented Nov 5, 2024

avoids confusion between Maven TLP vs Maven build tool vs Maven Central storage discovered in #23

notice that I was not able to run Python scripts (missing a requirements.txt file I suppose, I'm not a Python expert), then my updates are quite theoretical: please check it fully works before merging, I may have missed some impact

@@ -1,83 +1,83 @@
{
"arrow": {
"type": "maven"
"type": "maven-central"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -146,6 +146,6 @@ def is_sbom(name):
if sboms:
sbom = sboms[0]
url = f"{project.url()}/{lastVersion}/{sbom}"
cache = f'{pmc}/maven/{project.group_id}/{project.artifact_id}/{lastVersion}/{sbom}'
cache = f'{pmc}/maven-central/{project.group_id}/{project.artifact_id}/{lastVersion}/{sbom}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep maven here: I modeled the sboms directory structure after https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst

Copy link
Member Author

@hboutemy hboutemy Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand: it depends on the meaning we want to give to this
IMHO, purl type of some components is not the best value: for example, Airflow has pypi AND npm, and in the future, mixing multiple purl types will happen more and more (imagine Docker images)

that's why I changed in fact the meaning to "location where the initial storage has been done"
but I confirm that later, I want to have a human description of SBOMs, to let users know how many components are described, split by type of components: people don't read their SBOMs sufficiently IMHO, even on high-level aspects

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(very useful discussion: yes, this study opens key topics of interest)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9bd0d41 for simpler configuration

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is more meaningful to use the "identification of the artifact" rather than the "location where the initial storage has been done" - after all, an SBOM describes an artifact, so we should have some way to refer to those. I don't think that prevents creating human description of SBOMs, which I agree is also useful.

Copy link
Member Author

@hboutemy hboutemy Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is more meaningful to use the "identification of the artifact" rather than the "location where the initial storage has been done"

I agree to the idea
the reality is that Airflow content is listed under a pypi directory, but SBOMs describe either npm or application (see metadata https://github.com/apache/security-site/blob/sboms/sboms/airflow/airflow-2.10.2.md )

given there are multiple artifacts, it's not so easy to say what artifacts are described: the only clear fact is "where did we get these SBOMs from" (aka. "where did the project publish its SBOMs?"), and when writing dlcdn and website in additon to maven-central, I was even myself surprised about the values I got: clarifying where projects publish their SBOMs is more valuable than I thought

I don't think that prevents creating human description of SBOMs, which I agree is also useful.

yes, thanks for merging #25 , this is a true discovery to me to see what other projects did

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is more meaningful to use the "identification of the artifact" rather than the "location where the initial storage has been done"

I agree to the idea
the reality is that Airflow content is listed under a pypi directory, but SBOMs describe either npm or application (see metadata https://github.com/apache/security-site/blob/sboms/sboms/airflow/airflow-2.10.2.md )

given there are multiple artifacts, it's not so easy to say what artifacts are described

Sure - but then I think we should fix that

the only clear fact is "where did we get these SBOMs from" (aka. "where did the project publish its SBOMs?"), and when writing dlcdn and website in additon to maven-central, I was even myself surprised about the values I got: clarifying where projects publish their SBOMs is more valuable than I thought

Yeah, I think we should probably still do that, perhaps in scripts/sbom-locations.json or something that's to evolve from that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@potiuk can you clarify what artifacts the Airflow SBOMs describe exactly? Indeed my assumption of 'pypi' may have been overly simplistic, but can you confirm if the Purls in the metadata are correct? npm seems strange for Airflow (and indeed https://www.npmjs.com/package/apache-airflow does not exist), and application isn't even listed in https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst at all?

print(f"fetching {pmc} SBOMs from Maven Central")
status = os.system(f"python3 scripts/collect-maven-sboms.py {pmc}")
status = os.system(f"python3 scripts/collect-sboms-from-maven-central.py {pmc}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#36 created with this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants