Skip to content

Commit

Permalink
style: auto-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Oct 15, 2023
1 parent 1e71a8d commit 311f034
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ public String getApplicationName() {
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}

/**
* Get the value of nvdApiKey.
*
Expand Down Expand Up @@ -1002,7 +1003,7 @@ private void checkForFailure(Dependency[] dependencies) throws ScanAgentExceptio
for (Dependency d : dependencies) {
boolean addName = true;
for (Vulnerability v : d.getVulnerabilities()) {
if ((v.getCvssV2() != null && v.getCvssV2().getCvssData().getBaseScore() >= failBuildOnCVSS)
if ((v.getCvssV2() != null && v.getCvssV2().getCvssData().getBaseScore() >= failBuildOnCVSS)
|| (v.getCvssV3() != null && v.getCvssV3().getCvssData().getBaseScore() >= failBuildOnCVSS)
|| (v.getUnscoredSeverity() != null && SeverityUtil.estimateCvssV2(v.getUnscoredSeverity()) >= failBuildOnCVSS)
//safety net to fail on any if for some reason the above misses on 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ private boolean processApi() throws UpdateException {
}

//TODO consider using CVE_CPE_STARTS_WITH_FILTER

ExecutorService processingExecutorService = null;
try {
processingExecutorService = Executors.newFixedThreadPool(PROCESSING_THREAD_POOL_SIZE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ public void testMaskedKeys() {
assertThat("password should be masked",
getSettings().getPrintableValue("odc.database.password", "s3Cr3t!"),
equalTo("********"));

assertThat("tokens should be masked",
getSettings().getPrintableValue("odc.api.token", "asf4b$3428vasd84$#$45asda"),
equalTo("********"));

assertThat("other keys should not be masked",
getSettings().getPrintableValue("odc.version", "5.0.0"),
equalTo("5.0.0"));
Expand Down

0 comments on commit 311f034

Please sign in to comment.