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

Use gitoid for SoftwareArtifact integrity verification #610

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

zvr
Copy link
Member

@zvr zvr commented Jan 26, 2024

This adds the gitoid property to SoftwareArtifact so that values can be recorded and used for verification.

Signed-off-by: Alexios Zavras (zvr) <github@zvr.gr>
Signed-off-by: Alexios Zavras (zvr) <github@zvr.gr>
Copy link
Member

@goneall goneall left a comment

Choose a reason for hiding this comment

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

I'm fine with this solution as well.

@goneall goneall added this to the 3.0-rc2 milestone Jan 29, 2024
@goneall goneall mentioned this pull request Jan 30, 2024
32 tasks
@sbarnum
Copy link
Collaborator

sbarnum commented Jan 30, 2024

I disagree with this approach.

As extensively discussed in the many ( :-) ) other PRs, Issues, calls and threads gitoid is only one of multiple possible content identifier approaches.
We agreed that gitoid would be the suggested default for v3.0 but that we would leave the door open to others in the future post v3.0 in a backward compatible fashion.

I do not believe that throwing new properties on for each new approach is a tenable or scalable solution

I have not seen any identification of what is concretely broken or insufficient with the current approach where SoftwareArtifact has a contentIdentifier property of type IntegrityMethod with separate defined subclasses of IntegrityMethod for each artifact verification approach. There could be a simple Gitoid subclass of IntegrityMethod with a single gitoid property containing the gitoid. For v3.0 we could add a simple note to the markdown file for contentIdentifier stating that for SPDX v3.0 gitoid is the suggested approach.
Post v3.0, we could define a new SWHID (or whatever) subclass of IntegrityMethod and remove the gitoid default note and users could choose to use either.

What am I missing?

@sbarnum
Copy link
Collaborator

sbarnum commented Jan 30, 2024

I disagree with this approach.

As extensively discussed in the many ( :-) ) other PRs, Issues, calls and threads gitoid is only one of multiple possible content identifier approaches. We agreed that gitoid would be the suggested default for v3.0 but that we would leave the door open to others in the future post v3.0 in a backward compatible fashion.

I do not believe that throwing new properties on for each new approach is a tenable or scalable solution

I have not seen any identification of what is concretely broken or insufficient with the current approach where SoftwareArtifact has a contentIdentifier property of type IntegrityMethod with separate defined subclasses of IntegrityMethod for each artifact verification approach. There could be a simple Gitoid subclass of IntegrityMethod with a single gitoid property containing the gitoid. For v3.0 we could add a simple note to the markdown file for contentIdentifier stating that for SPDX v3.0 gitoid is the suggested approach. Post v3.0, we could define a new SWHID (or whatever) subclass of IntegrityMethod and remove the gitoid default note and users could choose to use either.

What am I missing?

Ok. From #611 it looks like part of this is just wanting to make it clear that the integrity method is for ContentIdentifier.
If content identifiers can always be expressed as a single serialized string then #611 looks like a good solution. It fits into the above but does not require a separate subclass of IntegrityMethod for every approach.

Copy link
Collaborator

@jeff-schutt jeff-schutt left a comment

Choose a reason for hiding this comment

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

LGTM after making the proposed change of maxcount to 2 to support SHA1 and SHA256

model/Software/Classes/SoftwareArtifact.md Outdated Show resolved Hide resolved
Co-authored-by: Jeff Schutt <87879343+jeff-schutt@users.noreply.github.com>
@goneall
Copy link
Member

goneall commented Feb 15, 2024

Based on @jeff-schutt comment in the security call, he's good with this PR now that the max cardinality has been updated

Copy link
Contributor

@kestewart kestewart left a comment

Choose a reason for hiding this comment

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

Based on the tech call, and then the following security call, this seems the best compromise. It follows the pattern of PURLs, and lets us create a content identifier class in a future release, where this could be moved.

@goneall goneall merged commit 76587c2 into spdx:main Feb 15, 2024
1 check passed
@zvr zvr deleted the verify-sw-gitoid branch August 12, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants