我使用的是 HP Fortify SCA 4.40 版。扫描 Java 项目后,Fortify 报告一个扫描警告:
The following references to java functions could not be resolved. These functions may be part of classes that could not be found, or there may be a type error at the call site of the given function relative to the function declaration. Please ensure the java source code can be compiled by a java compiler.
~instance~for~static~field~
我知道要解决此类警告,我需要更新 sourceanalyzer 类路径以指向包含缺少引用函数的 jar。但是在上面,“~instance~for~static~field~”没有给我任何关于在哪里可以找到丢失的引用的信息。考虑到我正在使用的代码库的大小,我无法手动深入到每个类中寻找符合上述模糊描述的可能缺失的引用。
有没有人对这种含糊的警告有任何见解?有没有提供进一步细节的原因?有关获取有关此缺失引用实际所在位置的更多详细信息的任何建议?
最佳答案
您是否尝试过查看日志文件?默认位置是
%userprofile%/AppData/local/Fortify/xxx
其中 xxx 是使用的 Fortify 应用程序 [例如AWB-4.40, Eclipse.Plugin-4.40, sca6.4, VS2013-4.21]
您还可以指定在重试扫描时创建更详细的日志文件。如果您使用的是命令行,则可以将以下内容添加到翻译和扫描步骤中
-debug -verbose -logfile PATH\filename.log
关于java - HP Fortify 扫描警告 : Reference cannot be resolved,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37840284/