在cmd中使用codeql分析代码,创建数据库这一步成功了,但是分析代码时报错,mvn版本是 3.9.11,jdk版本是17.0.14,codeql版本是2.22.4,使用codeql database analyze D:\myResults\backend-db codeql/java-queries:Security/ --format=csv --output=D:\myResults\result.csv创建csv或者sarif文件都会出现这个报错A fatal error occurred: Could not process query metadata for D:\myResults\backend-db\results\codeql\java-queries\Security\CWE\CWE-020\ExternalAPIsUsedWithUntrustedData.bqrs.
Error was: Unknown kind "Table". [UNSUPPORTED_KIND],也没有生成相关文件。
然后我尝试使用其自带的标准查询集,确实生成了sarif文件,但是出现以下命令:CodeQL scanned 36 out of 36 Java/Kotlin files in this invocation. Typically CodeQL is configured to analyze a single CodeQL language per invocation, so check other invocations to determine overall coverage information.
Analysis produced the following diagnostic information:
- Low Java analysis quality (1 result):
- Scanning Java code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code, among other reasons -- see other CodeQL diagnostics reported on the CodeQL status page for more details of possible causes. Addressing these warnings is advisable to avoid false-positive or missing results. If they cannot be addressed, consider scanning Java using either the
autobuildormanualbuild modes.
我很疑惑前面的命令为什么没法成功,究竟该怎么解决,后面的命令生成了sarif,但是显示质量低,究竟可以用吗,以后也可以用这个查询吗?还有就是我用单独的查询子集查询(没问题的)是可以成功的,我以后要怎么查询呢,--exclude=codeql/java-queries/Security/CWE/CWE-020/这个命令cmd也识别不了,不能排除有问题的子集,不知道该怎么查询了,希望大家可以帮忙看一下是什么问题。
- Scanning Java code completed successfully, but the scan encountered issues. This may be caused by problems identifying dependencies or use of generated source code, among other reasons -- see other CodeQL diagnostics reported on the CodeQL status page for more details of possible causes. Addressing these warnings is advisable to avoid false-positive or missing results. If they cannot be addressed, consider scanning Java using either the