command-line-interface - 通过 CLI 执行 CHECKMARX 扫描时出错

标签 command-line-interface 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

最佳答案

试试下面的一个

首先使用下面的命令生成一个token

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

注意:始终使用 token 对服务器进行身份验证,而不是在 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

关于command-line-interface - 通过 CLI 执行 CHECKMARX 扫描时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52928867/

相关文章:

java - Checkmarx、LDAP 注入(inject)和 ESAPI.encodeForLDAP

c# - CheckMarx 中等严重性警告 - 启动时仅使用 HttpOnly cookie

Checkmarx:网络不可用

java - 如何修复 A2-破坏的身份验证和 session 管理警告?

json - 通过 cli 将 JSON 转换为 CSV

javascript - Angular CLI(ng --version)命令错误 TS 和 WebPack

php - 使用转储文件在 CLI 模式下使用 PHP APC 缓存

ios - 提升中的项目模板

vb.net - 如何在 VB 8.0 中编写 MS-DOS 程序?

java - 错误: Checkmarx Scan Failed: No files to scan in Jenkins while CxSAST Scan