通过CLI执行CHECKMARX扫描时出错

时间:2018-10-22 12:02:23

标签: checkmarx

**runCxConsole scan -v -CxServer https://TEST.Checkmarx.com -projectName PROJECTNAME -CxUser Guest -CxPassword ***** -Locationtype folder  -locationpath "C:\Users\GuestName\Desktop\Desktop\PROJECTNAME\WebApp.zip" -preset Default**

大家好           我正在使用上述命令通过其CLI在checkmarx上运行扫描。 它显示了错误:

[2018-10-22 13:50:53,192 ERROR] Error executing SAST scan command: Failed to initialize SAST scan prerequisites: com.checkmarx.cxconsole.clients.general.exception.CxRestGeneralClientException: Failed to get teams: Failed to get teams: status code: 500. Error message:<!DOCTYPE html>

[2018-10-22 13:50:53,192 ERROR] Failure - General error occurred - error code 1

1 个答案:

答案 0 :(得分:0)

尝试以下一个

首先使用以下命令生成令牌

runCxConsole.cmd GenerateToken -v -CxUser username -CxPassword admin -CxServer http://localhost

CHECKMARX_HOME/runCxConsole.sh Scan -v -CxServer <checkmarx server details> -ProjectName "<project name>" -cxToken <token> -locationtype folder -locationpath "<file/path>" -preset "Checkmarx Default" -reportcsv CX_Scan.csv -ReportPDF CX_Scan.pdf

注意:始终使用令牌与服务器进行身份验证,而不是在CLI命令中对用户名和密码进行硬编码。

有关更多信息,您可以访问https://checkmarx.atlassian.net/wiki/spaces/SD/pages/222232891/Authentication+Login+to+the+CLI https://checkmarx.atlassian.net/wiki/spaces/SD/pages/1929937052/GitLab+Integration