Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Upcoming changes...

## [0.6.1] - 2024-04-01
### Changed
- Fixed issue with SBOM ingestion

## [0.6.0] - 2024-03-26
### Changed
- Updated free default URL to now point to `https://api.osskb.org`
Expand Down Expand Up @@ -69,3 +73,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[0.5.4]: https://github.com/scanoss/scanoss.java/compare/v0.5.3...v0.5.4
[0.5.5]: https://github.com/scanoss/scanoss.java/compare/v0.5.4...v0.5.5
[0.6.0]: https://github.com/scanoss/scanoss.java/compare/v0.5.5...v0.6.0
[0.6.1]: https://github.com/scanoss/scanoss.java/compare/v0.6.0...v0.6.1
2 changes: 1 addition & 1 deletion src/main/java/com/scanoss/Scanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private Scanner(Boolean skipSnippets, Boolean allExtensions, Boolean obfuscate,
.build());
this.scanApi = Objects.requireNonNullElseGet(scanApi, () ->
ScanApi.builder().url(url).apiKey(apiKey).timeout(timeout).retryLimit(retryLimit).flags(scanFlags)
.scanType(sbomType).sbom(sbom).customCert(customCert).proxy(proxy)
.sbomType(sbomType).sbom(sbom).customCert(customCert).proxy(proxy)
.build());
this.scanFileProcessor = Objects.requireNonNullElseGet(scanFileProcessor, () ->
ScanFileProcessor.builder().winnowing(this.winnowing).scanApi(this.scanApi).build());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/scanoss/cli/ScanCommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void run() {
sbomType = "identify";
sbom = loadFileToString(identifySbom);
} else if (ignoreSbom != null && !ignoreSbom.isEmpty()) {
sbomType = "ignore";
sbomType = "blacklist";
sbom = loadFileToString(ignoreSbom);
}
String caCertPem = null;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/scanoss/rest/ScanApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ public String scan(String wfp, String context, int scanID) throws ScanApiExcepti
}
if (sbom != null && !sbom.isEmpty()) {
String type = sbomType != null ? sbomType : "identify"; // Set SBOM type or default to 'identify'
data.put(type, sbom);
data.put("assets", sbom);
data.put("type", type);
}
Request request; // Create multipart request
try {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/scanoss/TestScanApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void TestScanApiScanPositive() {
log.info("<-- Starting {}", methodName);

String sbomIdentify = "pkg:github/scanoss/scanoss.py\n" + "pkg:pypi/scanoss\n";
ScanApi scanApi = ScanApi.builder().flags("8").scanType("identify").sbom(sbomIdentify)
ScanApi scanApi = ScanApi.builder().flags("8").sbomType("identify").sbom(sbomIdentify)
.url(server.url("/api/scan/direct").toString()).build();
server.enqueue(new MockResponse().addHeader("Content-Type", "application/json; charset=utf-8")
.setBody(SCAN_RESP_SUCCESS).setResponseCode(200));
Expand All @@ -114,7 +114,7 @@ public void TestScanApiScanCustomCertPositive() {
log.info("<-- Starting {}", methodName);

String sbomIdentify = "pkg:github/scanoss/scanoss.py\n" + "pkg:pypi/scanoss\n";
ScanApi scanApi = ScanApi.builder().flags("8").scanType("identify").sbom(sbomIdentify)
ScanApi scanApi = ScanApi.builder().flags("8").sbomType("identify").sbom(sbomIdentify)
.url(server.url("/api/scan/direct").toString())
.customCert(customSelfSignedCertificate)
.build();
Expand Down