CodeQL configuration steps for Windows driver testing is giving an error
I am trying to configure the CodeQL for WHQL testing, followed the steps mentioned in the link: static-tools-and-codeql
I have ended up with below error. C:\codeql-home\codeql>codeql --version CodeQL command-line toolchain release 2.6.3. Copyright (C) 2019-2021 GitHub, Inc. Unpacked in: C:\codeql-home\codeql Analysis results depend critically on separately distributed query and extractor modules. To list modules that are visible to the toolchain, use 'codeql resolve qlpacks' and 'codeql resolve languages'.
C:\codeql-home\codeql>*codeql pack install ..\Windows-Driver-Developer-Supplemental-Tools\src* Dependencies resolved. Installing packages... Install location: C:\Users\admin.codeql\packages { "packs" : [ { "name" : "codeql/cpp-all", "version" : "0.12.1", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/dataflow", "version" : "0.1.4", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/ssa", "version" : "0.2.4", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/util", "version" : "0.2.4", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/typetracking", "version" : "0.2.4", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/rangeanalysis", "version" : "0.0.3", "library" : true, "result" : "INSTALLED" }, { "name" : "codeql/tutorial", "version" : "0.2.4", "library" : true, "result" : "INSTALLED" } ] }
C:\codeql-home\codeql>codeql database analyze C:\codeql-home\databases\Database --format=sarifv2.1.0 --output=C:\codeql-home\USBDriverProjectResults-mustfix.sarif C:\codeql-home\Windows-Driver-Developer-Supplemental-Tools\suites\windows_driver_mustfix.qls --download { "packs" : [ { "name" : "codeql/cpp-queries", "version" : "0.9.0", "library" : false, "result" : "INSTALLED" }, { "name" : "microsoft/windows-drivers", "version" : "1.1.0", "library" : false, "result" : "INSTALLED" } ] } Running queries. ERROR: Referenced pack 'codeql/cpp-all' not found. (C:\Users\admin.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) ERROR: Referenced pack 'codeql/suite-helpers' not found. (C:\Users\admin.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) ERROR: Referenced pack 'codeql/util' not found. (C:\Users\admin.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) A fatal error occurred: Could not resolve library path for C:\Users\admin.codeql\packages\codeql\cpp-queries\0.9.0
C:\codeql-home\codeql>codeql pack download codeql/[email protected] codeql/[email protected] codeql/[email protected] Package installation location: C:\Users\DTMLLUAdminUser.codeql\packages Already installed codeql/[email protected] Installed fresh codeql/[email protected] Already installed codeql/[email protected]
C:\codeql-home\codeql>codeql database analyze C:\codeql-home\databases\WAGUSBDatabase --format=sarifv2.1.0 --output=C:\codeql-home\WAGUSBDriverProjectResults-mustfix.sarif C:\codeql-home\Windows-Driver-Developer-Supplemental-Tools\suites\windows_driver_mustfix.qls --download { "packs" : [ { "name" : "codeql/cpp-queries", "version" : "0.9.0", "library" : false, "result" : "IGNORED" }, { "name" : "microsoft/windows-drivers", "version" : "1.1.0", "library" : false, "result" : "IGNORED" } ] } Running queries. ERROR: Referenced pack 'codeql/cpp-all' not found. (C:\Users\DTMLLUAdminUser.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) ERROR: Referenced pack 'codeql/suite-helpers' not found. (C:\Users\DTMLLUAdminUser.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) ERROR: Referenced pack 'codeql/util' not found. (C:\Users\DTMLLUAdminUser.codeql\packages\codeql\cpp-queries\0.9.0\qlpack.yml:1,1-1) A fatal error occurred: Could not resolve library path for C:\Users\DTMLLUAdminUser.codeql\packages\codeql\cpp-queries\0.9.0
Can anyone help me resolving this issue.
After installing the dependency packages, I am getting a big list of errors (attached the log file codeql-error.txt).
What is that I am missing here?
C:\codeql-home\codeql>codeql pack install C:\Users\admin.codeql\packages\codeql\cpp-queries\1.0.1
Dependencies resolved. Installing packages...
Install location: C:\Users\admin.codeql\packages
{
"packs" : [
{
"name" : "codeql/cpp-all",
"version" : "1.1.0",
"library" : true,
"result" : "IGNORED"
},
{
"name" : "codeql/dataflow",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/ssa",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/util",
"version" : "1.0.1",
"library" : true,
"result" : "IGNORED"
},
{
"name" : "codeql/typetracking",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/mad",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/rangeanalysis",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/tutorial",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/typeflow",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/xml",
"version" : "1.0.1",
"library" : true,
"result" : "INSTALLED"
},
{
"name" : "codeql/suite-helpers",
"version" : "1.0.1",
"library" : false,
"result" : "IGNORED"
}
]
}
You've all kind of version mismatches it seems. Note that the page you linked specifies specific versions of the packages you will need to install, and you're installing much newer versions. For example, you're installing codeql/cpp-all version 1.1.0, while you need version 0.9.0 (if using CodeQL 2.15.4).
It's probably best to use 2.15.4, because we do not really support version 2.6.3 anymore. Alternatively you could ask at https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools.
This issue is stale because it has been open 14 days with no activity. Comment or remove the Stale label in order to avoid having this issue closed in 7 days.
This issue was closed because it has been inactive for 7 days.