-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix/cyclonedx reader license expression (#280)
* Add "packageType" parameter and logic to create purl in CSV Reader. Refactor tests and config readers * Add warn message for unknown packagetypes * Improve log message * Add release note * Add Unit Test and format code * Add documentation * Update CSV reader doc * Move switch-case block to dedicated method * Run tests with packageType=null * Check for null or empty packageType. Make logger non static for testing purposes. * Add mockito dependency for tests. * Add tests for npm, pypi and empty packageType * minor improvement * swap position of artifactId and version in config * formatting * Consistent syntax * Add condition to check for expressions * Take expression as it is instead of parsing and splitting the licenses. * Add release note * Remove unused imports * Add unit test for reading an expression --------- Co-authored-by: ohecker <8004361+ohecker@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
144 additions
and
21 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.5", | ||
"serialNumber": "urn:uuid:dd714b36-700a-4a2c-be85-eeb8723c2489", | ||
"version": 1, | ||
"metadata": { | ||
"timestamp": "2024-07-08T17:39:55Z", | ||
"tools": { | ||
"components": [ | ||
{ | ||
"group": "@cyclonedx", | ||
"name": "cdxgen", | ||
"version": "10.7.1", | ||
"purl": "pkg:npm/%40cyclonedx/cdxgen@10.7.1", | ||
"type": "application", | ||
"bom-ref": "pkg:npm/@cyclonedx/cdxgen@10.7.1", | ||
"author": "OWASP Foundation", | ||
"publisher": "OWASP Foundation" | ||
} | ||
] | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "OWASP Foundation" | ||
} | ||
], | ||
"lifecycles": [ | ||
{ | ||
"phase": "build" | ||
} | ||
], | ||
"component": { | ||
"group": "", | ||
"name": "lib", | ||
"version": "latest", | ||
"type": "application", | ||
"bom-ref": "pkg:maven/lib@latest", | ||
"purl": "pkg:maven/lib@latest" | ||
} | ||
}, | ||
"components": [ | ||
{ | ||
"publisher": "Oracle Corporation", | ||
"group": "org.glassfish.hk2", | ||
"name": "hk2-locator", | ||
"version": "2.5.0-b42", | ||
"description": "${project.name}", | ||
"licenses": [ | ||
{ | ||
"expression": "(CDDL-1.0 OR GPL-2.0-with-classpath-exception)" | ||
} | ||
], | ||
"purl": "pkg:maven/org.glassfish.hk2/hk2-locator@2.5.0-b42?type=jar", | ||
"externalReferences": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://hk2-project.github.io" | ||
} | ||
], | ||
"type": "library", | ||
"bom-ref": "pkg:maven/org.glassfish.hk2/hk2-locator@2.5.0-b42?type=jar", | ||
"evidence": { | ||
"identity": { | ||
"field": "purl", | ||
"confidence": 1, | ||
"methods": [ | ||
{ | ||
"technique": "manifest-analysis", | ||
"confidence": 1, | ||
"value": "hk2-locator-2.5.0-b42.jar" | ||
} | ||
] | ||
} | ||
}, | ||
"properties": [ | ||
{ | ||
"name": "SrcFile", | ||
"value": "hk2-locator-2.5.0-b42.jar" | ||
} | ||
] | ||
} | ||
], | ||
"dependencies": [] | ||
} |
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