Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPP]: ERROR: Dependency on pack 'codeql/util' uses '${workspace}', but that pack was not found in the workspace. #18532

Open
alok-verma-tfs opened this issue Jan 18, 2025 · 2 comments
Labels
question Further information is requested

Comments

@alok-verma-tfs
Copy link

Description of the issue

Currently I am using jenkins pipeline for codeql database create and analyze on worker node(windows 2022 data server) but it is failing when I am analyzing it.
To create database and build using below command:

  • codeql.exe database create --language cpp --source-root . --command "msbuild solution.sln -t:restore,rebuild /p:Configuration="Release" /p:PreferredToolArchitecture=x64 /p:CL_MPCount=4 /flp:Logfile=build.log /flp:verbosity=diagnostic /m

And to Analyze running below command

  • codeql.exe database analyze codeql_cpp C:\Users\Administrator\Documents\codeql\cpp\ql\src\Security --format=sarifv2.1.0 --output=codeql_cpp.sarif --threads=4

and it is failing with below error
ERROR: Dependency on pack 'codeql/util' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\src\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/dataflow' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/mad' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/rangeanalysis' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/ssa' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/tutorial' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/typeflow' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/util' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Dependency on pack 'codeql/xml' uses '${workspace}', but that pack was not found in the workspace. (C:\w\codeql\cpp\ql\lib\qlpack.yml:1,1-1)
ERROR: Pack 'codeql/typeflow' was not found locally, and is not listed in the lock file. Run 'codeql pack install' to update the lock file and download the dependencies. (C:\w\codeql\cpp\ql\src\qlpack.yml:1,1-1)
ERROR: No valid pack solution found:

Note:
Same process i tied on my local jenkins setup windows 11 it worked fine

@alok-verma-tfs alok-verma-tfs added the question Further information is requested label Jan 18, 2025
@alok-verma-tfs
Copy link
Author

Run the "codeql pack install" some the above problem now I am getting below error

ERROR: In extension for codeql/cpp-all:sourceModel, extensible predicate 'sourceModel' does not exist in pack 'codeql/cpp-all'. (C:\w\codeql\cpp\ql\lib\ext\Boost.Asio.model.yml:1,1-1)
ERROR: In extension for codeql/cpp-all:sinkModel, extensible predicate 'sinkModel' does not exist in pack 'codeql/cpp-all'. (C:\w\codeql\cpp\ql\lib\ext\Boost.Asio.model.yml:1,1-1)
ERROR: In extension for codeql/cpp-all:summaryModel, extensible predicate 'summaryModel' does not exist in pack 'codeql/cpp-all'. (C:\w\codeql\cpp\ql\lib\ext\Boost.Asio.model.yml:1,1-1)
ERROR: In extension for codeql/cpp-all:summaryModel, extensible predicate 'summaryModel' does not exist in pack 'codeql/cpp-all'. (C:\w\codeql\cpp\ql\lib\ext\bsl.array.model.yml:1,1-1)
ERROR: In extension for codeql/cpp-all:summaryModel, extensible predicate 'summaryModel' does not exist in pack 'codeql/cpp-all'. (C:\w\codeql\cpp\ql\lib\ext\bsl.deque.model.yml:1,1-1)

@alok-verma-tfs
Copy link
Author

Now below error

Now starting: C:\Users\Administrator\Downloads\codeql-win64\codeql\codeql.exe database analyze codeql_workernode_cpp/ C:\w\codeql\cpp\ql\src\Security --format=sarifv2.1.0 --output=codeql_workernode_cpp.sarif --threads=4
Running queries.
Compiling query plan for C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\CountUntrustedDataToExternalAPI.ql.
ERROR: could not resolve module cpp (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\CountUntrustedDataToExternalAPI.ql:11,8-11)
ERROR: could not resolve module cpp (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:6,16-19)
ERROR: could not resolve module semmle.code.cpp.models.interfaces.DataFlow (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:7,16-58)
ERROR: could not resolve module semmle.code.cpp.models.interfaces.Taint (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:8,16-55)
ERROR: could not resolve module UntrustedDataToExternalApiFlow (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:13,36-66)
ERROR: could not resolve module DataFlow (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:16,3-11)
ERROR: could not resolve module UntrustedDataToExternalApiFlow (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:16,43-73)
ERROR: could not resolve type Function (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:43,12-20)
ERROR: could not resolve type Function (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIs.qll:22,25-33)
ERROR: could not resolve module semmle.code.cpp.ir.dataflow.TaintTracking (C:\w\codeql\cpp\ql\src\Security\CWE\CWE-020\ExternalAPIsSpecific.qll:5,8-49)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant