Concept and mechanism
Code scanning provides evidence only for the languages, branches, queries, models, and runs it actually covered. A query pack contains runnable queries and can declare suites, dependencies, and libraries in qlpack.yml. Its purpose is to distribute and execute queries; it does not automatically model every unsupported API as a data-flow source or sink.
A model pack, currently in public preview for languages documented by GitHub, adds models for libraries and frameworks using data extensions. Those models may improve how analysis understands propagation, sources, and sinks in project dependencies not supported by default.
Do not assume preview support is stable or available in every language. Before adopting a third-party pack, verify provenance, version, compatibility, permissions, and pipeline effect. A failed or skipped analysis is not equivalent to zero vulnerabilities.
Existing alerts can remain visible after new configuration fails; execution health and historical alert inventory are different evidence.
Guided application
In an authorized learning exercise, begin by listing language, default versus advanced setup, last completed analysis, and the query suites actually running. For a framework with insufficient models, decide whether the problem is a missing detection query or missing library semantics describing sources, propagation and sinks.
Use minimal examples with expected behavior, run CodeQL in an authorized environment, and compare results with and without the extension. Record observed false positives, missed cases and runtime effects. When migrating from default to advanced setup to customize scanning, verify repository eligibility, permissions and runners, inspect diagnostics and confirm the CodeQL database and queries actually ran.
Compare covered branches, loaded packs, generated alerts and triage ownership. Do not represent YAML creation as scanning coverage or a dismissed alert as proof of remediation without checking its rationale and the code change.
An additional query does not necessarily understand a custom API data source; a model pack may supply supported semantics, but effectiveness requires testing the relevant flow.
Common pitfalls
Treating query and model packs as identical; assuming universal preview support; treating YAML as proof of execution; using old alerts as evidence of current scanning; trusting external packs without provenance.
Related topics: Products, scope, and prevention · Credentials, response, and exceptions · Dependencies, inventory, and merge prevention
Separate detection queries, data models and pipeline health; validate each with evidence.
References
- CodeQL query and model packs · GitHub CodeQL Docs current Oct 2026 (model packs public preview)
- CodeQL advanced setup and runtime prerequisites · GitHub CodeQL Docs current Oct 2026 (model packs public preview)