-
Notifications
You must be signed in to change notification settings - Fork 314
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
SpdxDocumentFile: Report issues from subprojects that cannot be mapped to a package ID. #8851
Merged
MarcelBochtler
merged 4 commits into
oss-review-toolkit:main
from
boschglobal:spdx-doc-dropped-issues
Jul 17, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cb560c7
test(SpdxDocumentFile): Add test for missing issues for external refs
MarcelBochtler e669f49
fix(SpdxDocumentFile): Add created issues to the PackageReference
MarcelBochtler 04ac652
fix(SpdxDocumentFile): Ensure to collect issues from external doc refs
MarcelBochtler 43c2fa4
test(SpdxDocumentFile): Use correct checksumValue for external document
MarcelBochtler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...Test/assets/projects/synthetic/illegal-chars-external-refs/illegal_chars/package.spdx.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SPDXID: "SPDXRef-DOCUMENT" | ||
spdxVersion: "SPDX-2.2" | ||
creationInfo: | ||
created: "2022-06-29T00:00:00Z" | ||
creators: | ||
- "Organization: OSS Review Toolkit" | ||
name: "illegal_chars" | ||
dataLicense: "CC0-1.0" | ||
documentNamespace: "http://spdx.org/spdxdocs/example" | ||
documentDescribes: | ||
- "SPDXRef-Package-asio_dtls" | ||
packages: | ||
- SPDXID: "SPDXRef-Package-illegal_chars" # This SPDX ID contains '_' which is not allowed. | ||
description: "A SPDX document that is in a directory characters not allowed for SPDX IDs" | ||
copyrightText: "NONE" | ||
filesAnalyzed: false | ||
homepage: "https://example.com/" | ||
licenseConcluded: "NOASSERTION" | ||
licenseDeclared: "NOASSERTION" | ||
originator: "Organization: Robert Bosch GmbH" | ||
name: "illegal_chars" | ||
downloadLocation: "https://example.com" | ||
versionInfo: "1.0.0" |
29 changes: 29 additions & 0 deletions
29
...dx/src/funTest/assets/projects/synthetic/illegal-chars-external-refs/project-xyz.spdx.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SPDXID: "SPDXRef-DOCUMENT" | ||
spdxVersion: "SPDX-2.2" | ||
creationInfo: | ||
created: "2024-07-08T18:30:22Z" | ||
creators: | ||
- "OSS Review Toolkit" | ||
name: "External Ref with illegal chars" | ||
dataLicense: "CC0-1.0" | ||
documentNamespace: "https://spdx.org/spdxdocs/example" | ||
documentDescribes: | ||
- "SPDXRef-Package-illegal-chars" | ||
|
||
externalDocumentRefs: | ||
- externalDocumentId: "DocumentRef-illegal_chars" # This SPDX ID contains '_' which is not allowed. | ||
spdxDocument: "illegal_chars/package.spdx.yml" | ||
checksum: | ||
algorithm: "SHA1" | ||
checksumValue: "3e3edec9f5073a7b17a9fd066e5f49ed3e41f0a2" | ||
|
||
packages: | ||
- SPDXID: "SPDXRef-Package-test" | ||
copyrightText: "NONE" | ||
downloadLocation: "https://example.com" | ||
filesAnalyzed: false | ||
homepage: "NONE" | ||
licenseConcluded: "Apache-2.0" | ||
licenseDeclared: "Apache-2.0" | ||
name: "Illegal Chars" | ||
originator: "Organization: OSS Review Toolkit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we have tests for
SpdxResolvedDocument
in place that verify the checksum, so please explain in the commit message how this could have been wrong.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to explain it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. Let me try to rephrase that for my understanding: The checksum was always wrong, but that fact did not result in an issue or test failure until the previous commit. Now that issues are properly propagated, it would result in a test failure of
SpdxDocumentFileFunTest
whose expected result files contain no issues. Correct?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.