Skip to content

Commit

Permalink
Fix 2 merge errors in previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Wichers committed Aug 12, 2024
1 parent 9e268e3 commit 7c9c554
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ public static int translate(int cwe) {
return CweNumber.XXE;
case 614:
return CweNumber.INSECURE_COOKIE;
case 1004:
return CweNumber.COOKIE_WITHOUT_HTTPONLY;
case 643:
return CweNumber.XPATH_INJECTION;
case 1004:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,4 @@ void readerHandlesSemgrepPROResultFile() throws Exception {
assertEquals(CweNumber.COOKIE_WITHOUT_HTTPONLY, result.get("1").get(0).getCWE());
assertEquals(CweNumber.XSS, result.get("2").get(0).getCWE());
}

@Test
void readerHandlesSemgrepPROResultFile() throws Exception {
SemgrepSarifReader reader = new SemgrepSarifReader();
TestSuiteResults result = reader.parse(resultFilePRO);

assertEquals(TestSuiteResults.ToolType.SAST, result.getToolType());
assertFalse(result.isCommercial());
assertEquals("Semgrep PRO", result.getToolName());
assertEquals("1.68.1", result.getToolVersion());

assertEquals(2, result.getTotalResults());

assertEquals(CweNumber.COOKIE_WITHOUT_HTTPONLY, result.get(1).get(0).getCWE());
assertEquals(CweNumber.XSS, result.get(2).get(0).getCWE());
}
}

0 comments on commit 7c9c554

Please sign in to comment.