Skip to content

Unable to use codeql-cpp-queries from the CLI #25

@prdngr

Description

@prdngr

I am trying to analyze a database using the codeql-cpp-queries pack; however, I get the error below.

codeql database analyze db/ \
  --download githubsecuritylab/codeql-cpp-queries \
  --format=sarif-latest --output=results.sarif
{                                                    
  "packs" : [                                        
    {                                                
      "name" : "githubsecuritylab/codeql-cpp-queries",
      "version" : "0.0.2",
      "library" : false,
      "result" : "INSTALLED"
    }
  ],
  "packDir" : "/home/user/.codeql/packages"
}
Running queries.
A fatal error occurred: Compiled CodeQL packs cannot reference another pack from one of its query suites. 'githubsecuritylab/codeql-cpp-queries@0.0.2' references 'github-queries-ruby'.

I have found this issue already, but I think it is only somewhat related, as we have two different packs here, i.e., codeql-cpp-queries and github-queries-ruby. How can I fix this error so that I can run the GitHubSecurityLab packs?

CodeQL Version

The CodeQL CLI resides at /opt/codeql/codeql, and the CodeQL repository was downloaded to /opt/codeql/codeql-repo as per the advanced setup guide.

codeql --version
CodeQL command-line toolchain release 2.15.1.
Copyright (C) 2019-2023 GitHub, Inc.
Unpacked in: /opt/codeql/codeql

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions