3

runCxConsole scan -v -CxServer https://TEST.Checkmarx.com -projectName PROJECTNAME -CxUser Guest -CxPassword ***** -Locationtype 文件夹 -locationpath "C:\Users\GuestName\Desktop\Desktop\PROJECTNAME\WebApp.zip " - 预设默认值

我正在使用上述命令通过其 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
4

1 回答 1

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+集成

于 2020-09-26T08:25:47.670 回答