GITHUB-ADVANCED-SECURITY practice question 1 of 15
– [Use Code Scanning with CodeQL] When using CodeQL, what extension stores query suite definitions?
Full set: 75 questionsA CodeQL query suite is a file with a .qls extension that defines a set of queries to run. These files use a specific YAML-based format to specify rules for selecting queries. You can include queries by their path, by the directory they are in, or by their metadata properties (e.g., @tags, @kind). This allows for the creation of custom, reusable sets of queries tailored for a specific analysis, such as running only high-precision security queries.
A. .yml: This extension is used for configuration files, such as the GitHub Actions workflow file (codeql-analysis.yml), which invokes a query suite but does not define it.
B. .ql: This is the file extension for a single, executable CodeQL query. A query suite is a collection of these .ql files, not a single file.
C. .qll: This is the file extension for a CodeQL library. These files contain reusable predicates and classes that are imported by .ql files but are not executable queries themselves.
1. GitHub Docs, "Creating CodeQL query suites": "A query suite is a .qls file that allows you to select queries to run based on certain properties, such as their name, location on disk, or metadata." This document explicitly defines the purpose and extension of query suite files.
2. GitHub Docs, "About CodeQL queries": This page distinguishes between the different file types. It states, "CodeQL queries are stored in files with a .ql extension." and "Query libraries are files with a .qll extension... They are not queries themselves, but they contain useful modules, classes, and predicates that can be used in queries." This clarifies the roles of .ql and .qll files.
3. GitHub Docs, "Configuring default setup for code scanning": In the section "Specifying query suites," the documentation shows how a .yml configuration file references a .qls file (e.g., queries: ./path/to/custom-queries.qls), demonstrating the distinct roles of the two file types.
Keep practicing
Take the free GITHUB-ADVANCED-SECURITY practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GITHUB-ADVANCED-SECURITY practice questions
- Question 2– [Configure and Use Secret Scanning] What happens when you enable secret scanning on a p…
- Question 3– [Configure and Use Dependency Management] A dependency has a known vulnerability. What …
- Question 4– [Configure and Use Secret Scanning] What is a prerequisite to define a custom pattern f…
- Question 5– [Describe the GHAS Security Features and Functionality] What is a security policy?
- Question 6– [Configure GitHub Advanced Security Tools in GitHub Enterprise] What role is required t…
- Question 7– [Configure and Use Code Scanning] Who can fix a code scanning alert on a private reposi…
