这些是我为源代码设置 Fortify SCA 所遵循的步骤。
- 包含 sca-maven-plugin-3.90.jar 作为我的 Maven 插件 (pom.xml) 的一部分。
尝试运行
mvn sca:translate .
时,出现以下错误。[INFO] Created output dir <dir> [INFO] cmd: "sourceanalyzer @<dir>/sca-translate-java.txt" 'sourceanalyzer' is not recognized as an internal or external command, operable program or batch file. [ERROR] Error invoking sourceanalyzer. Exit code: 1. Verify your project settings and your SCA installation. [INFO] Executing command: sourceanalyzer -b <id> -group-id -artifact-id <artifact> -show-module ERROR] Command execution failed. Exit code: 1. Make sure that the executable is available
不确定我在这里缺少什么。
最佳答案
确保您可以直接从命令行运行 sourceanalyzer。
C:\>sourceanalyzer -?
如果这不起作用,您可能需要重新安装 Fortify,但首先检查您的 PATH 变量。
C:\>echo %PATH%
这应该报告 Fortify 安装位置 bin 目录:
C:\Program Files\HP_Fortify\HP_Fortify_SCA_$version\bin
关于java - sourceanalyzer 未被识别为内部或外部命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30479525/