The checked-in configurations reference community packs that have already been published to GHCR.
Add new language packs to the relevant configurations after their first release so they do not point to packages that consumers cannot download yet.
We use a custom configuration file(.yml) rather than a standalone query suite(.qls) so the CodeQL Action downloads the required packs automatically and adds the selected queries without filtering the standard scan.
Also consider that it is possible to directly use the config: input to the CodeQL Action and copy the statements from these config files directly without using the config-file: reference to the .yml files in this repository.
The default.yml configuration is the default config file used to make it easy to use the CodeQL Community Packs. The queries included here are pulled in from the language default suites automatically when referencing the community packs. The default suites as specified in each language's {LANG}/src/qlpack.yml. The standard configuration is:
defaultSuiteFile: suites/{LANG}.qlsThe audit.yml configuration is used primarily to conduct a security assessment of potentially vulnerable code, by running a number of audit queries with CodeQL. Many of these queries operate on partial path queries, thus not seeking complete source/sink flows. Use these wide-ranging queries or partial flow paths as tools to infer potential taint disruptions and identify opportunities for customization improvements.
These are based on the suite in each language suites folder called {LANG}-audit.qls
Note
Ruby, Actions, Rust, and Swift do not currently have audit suites in this configuration.
Adds 12 built-in and 12 community credential/password queries across seven languages to the standard code-scanning scan. Packs are downloaded automatically, and explicit query paths avoid running entire community default suites. No global query filters restrict the standard scan.
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: GitHubSecurityLab/CodeQL-Community-Packs/configs/hardcoded-credentials.yml@mainThe config includes commented options for code-scanning, security-extended,
and disable-default-queries: true to run only the listed credential checks.
Copy the config into your repository to customize it; the remote reference works
after merge to main and can be pinned to a commit SHA.
This synthetics.yml configuration is intended for analyzing synthetic (intentionally vulnerable) code samples for vulnerabilities. This configuration uses all possible security queries/extensions from the CodeQL built in packs, the CodeQL Community Packs, and additional OSS packs. It also includes the queries from the built-in security-experimental.qls suite with additional lower precision/experimental queries:
- queries marked as
@precision: lowor missing a precision - queries marked as
@problem.severity: recommendation - queries in
\experimental\folders
This configuration will provide a more thorough analysis at the cost of longer analysis times and potential false positives. Consider using the audit.yml configuration to look for additional false negative scenarios.