Package com.checkmarx.jenkins
Class PluginUtils
- java.lang.Object
-
- com.checkmarx.jenkins.PluginUtils
-
public class PluginUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHECKMARX_AST_RESULTSstatic StringCHECKMARX_AST_RESULTS_HTMLstatic StringCHECKMARX_AST_RESULTS_JSONstatic StringdefaultOutputNamestatic StringHTTP_PROXYstatic StringREGEX_SCAN_ID_FROM_LOGS
-
Constructor Summary
Constructors Constructor Description PluginUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringauthValidate(ScanConfig scanConfig, String checkmarxCliExecutable)static CheckmarxInstallationfindCheckmarxInstallation(String checkmarxInstallation)static List<String>generateHTMLReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log)static List<String>generateJsonReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log)static StringgetProxy()static StringgetScanIdFromLogFile(String logs)static voidinsertSecretsAsEnvVars(ScanConfig scanConfig, EnvVars envVars)static booleanisPolicyViolated(String logs)static List<String>scanCancel(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log)static List<String>submitScanDetailsToWrapper(ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log)
-
-
-
Field Detail
-
CHECKMARX_AST_RESULTS
public static final String CHECKMARX_AST_RESULTS
- See Also:
- Constant Field Values
-
CHECKMARX_AST_RESULTS_HTML
public static final String CHECKMARX_AST_RESULTS_HTML
- See Also:
- Constant Field Values
-
CHECKMARX_AST_RESULTS_JSON
public static final String CHECKMARX_AST_RESULTS_JSON
- See Also:
- Constant Field Values
-
REGEX_SCAN_ID_FROM_LOGS
public static final String REGEX_SCAN_ID_FROM_LOGS
- See Also:
- Constant Field Values
-
HTTP_PROXY
public static final String HTTP_PROXY
- See Also:
- Constant Field Values
-
defaultOutputName
public static final String defaultOutputName
- See Also:
- Constant Field Values
-
-
Method Detail
-
findCheckmarxInstallation
public static CheckmarxInstallation findCheckmarxInstallation(String checkmarxInstallation)
-
submitScanDetailsToWrapper
public static List<String> submitScanDetailsToWrapper(ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException
- Throws:
IOException
-
scanCancel
public static List<String> scanCancel(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
generateHTMLReport
public static List<String> generateHTMLReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException
- Throws:
IOException
-
generateJsonReport
public static List<String> generateJsonReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException
- Throws:
IOException
-
authValidate
public static String authValidate(ScanConfig scanConfig, String checkmarxCliExecutable) throws IOException, InterruptedException, com.checkmarx.ast.wrapper.CxException
- Throws:
IOExceptionInterruptedExceptioncom.checkmarx.ast.wrapper.CxException
-
isPolicyViolated
public static boolean isPolicyViolated(String logs)
-
insertSecretsAsEnvVars
public static void insertSecretsAsEnvVars(ScanConfig scanConfig, EnvVars envVars) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
getProxy
public static String getProxy()
-
-