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 String
CHECKMARX_AST_RESULTS
static String
CHECKMARX_AST_RESULTS_HTML
static String
CHECKMARX_AST_RESULTS_JSON
static String
defaultOutputName
static String
HTTP_PROXY
static String
REGEX_SCAN_ID_FROM_LOGS
-
Constructor Summary
Constructors Constructor Description PluginUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
authValidate(ScanConfig scanConfig, String checkmarxCliExecutable)
static CheckmarxInstallation
findCheckmarxInstallation(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 String
getProxy()
static String
getScanIdFromLogFile(String logs)
static void
insertSecretsAsEnvVars(ScanConfig scanConfig, EnvVars envVars)
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, InterruptedException, URISyntaxException, com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException, com.checkmarx.ast.wrapper.CxException
- Throws:
IOException
InterruptedException
URISyntaxException
com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
com.checkmarx.ast.wrapper.CxException
-
scanCancel
public static List<String> scanCancel(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException, InterruptedException, com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
- Throws:
IOException
InterruptedException
com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
-
generateHTMLReport
public static List<String> generateHTMLReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException, InterruptedException, com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
- Throws:
IOException
InterruptedException
com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
-
generateJsonReport
public static List<String> generateJsonReport(UUID scanId, ScanConfig scanConfig, String checkmarxCliExecutable, CxLoggerAdapter log) throws IOException, InterruptedException, com.checkmarx.ast.wrapper.CxException, URISyntaxException, com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
- Throws:
IOException
InterruptedException
com.checkmarx.ast.wrapper.CxException
URISyntaxException
com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
-
authValidate
public static String authValidate(ScanConfig scanConfig, String checkmarxCliExecutable) throws IOException, InterruptedException, com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException, URISyntaxException, com.checkmarx.ast.wrapper.CxException
- Throws:
IOException
InterruptedException
com.checkmarx.ast.wrapper.CxConfig.InvalidCLIConfigException
URISyntaxException
com.checkmarx.ast.wrapper.CxException
-
insertSecretsAsEnvVars
public static void insertSecretsAsEnvVars(ScanConfig scanConfig, EnvVars envVars) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getProxy
public static String getProxy()
-
-