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
2 changes: 1 addition & 1 deletion checkmarx-ast-cli.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.66
2.3.67
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.22.2</version>
<version>2.22.3</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/cx-linux
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx-linux-arm
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx-mac
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx.exe
Git LFS file not shown
14 changes: 13 additions & 1 deletion src/test/java/com/checkmarx/ast/results/ResultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.checkmarx.ast.results.result.Result;
import com.checkmarx.ast.scan.Scan;
import com.checkmarx.ast.wrapper.CxConstants;
import com.checkmarx.ast.wrapper.CxException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
Expand All @@ -20,6 +21,8 @@ class ResultTest extends BaseTest {
private static String CWE_ID = "79";
private static String LANGUAGE = "PHP";
private static String QUERY_NAME = "Reflected XSS All Clients";
private static final int CODEBASHING_LICENSE_NOT_FOUND_EXIT_CODE = 3;
private static final int CODEBASHING_LESSON_NOT_FOUND_EXIT_CODE = 4;

@Test
void testResultsHTML() throws Exception {
Expand Down Expand Up @@ -64,7 +67,16 @@ void testResultsStructure() throws Exception {

@Test()
void testResultsCodeBashing() throws Exception {
List<CodeBashing> codeBashingList = wrapper.codeBashingList(CWE_ID, LANGUAGE, QUERY_NAME);
List<CodeBashing> codeBashingList;
try {
codeBashingList = wrapper.codeBashingList(CWE_ID, LANGUAGE, QUERY_NAME);
} catch (CxException e) {
// The CLI exits with 3 (no CodeBashing license) or 4 (no lesson mapped, "No codebashing link available").
// Both depend on the tenant/backend mapping, not on the wrapper.
Assumptions.assumeFalse(e.getExitCode() == CODEBASHING_LICENSE_NOT_FOUND_EXIT_CODE
|| e.getExitCode() == CODEBASHING_LESSON_NOT_FOUND_EXIT_CODE, e.getMessage());
throw e;
}
Assertions.assertTrue(codeBashingList.size() > 0);
String path = codeBashingList.get(0).getPath();
Assertions.assertTrue(path.length() > 0);
Expand Down
Loading