Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/codeql-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: github/codeql-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: henrymercer/per-language-bundles
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 13 commits
  • 13 files changed
  • 3 contributors

Commits on Sep 9, 2026

  1. Add support for per-language CodeQL bundles

    Download a bundle containing only the single language being analyzed,
    rather than the combined bundle that contains every language, when that
    is both safe and beneficial. Per-language bundles are substantially
    smaller, so this saves download time and disk space on the runner.
    
    Eligibility is decided in one place, since it is easy for these
    conditions to drift apart. Per-language bundles are never added to the
    toolcache, because a bundle for one language must not be reused for a
    job that analyzes another.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    b84b1e3 View commit details
    Browse the repository at this point in the history
  2. Add a PR check for per-language CodeQL bundles

    Checks that a bundle containing only a single language is both trimmed
    and able to analyze that language. Uses the Actions bundle, since the
    Actions QL pack is the only one that depends on the library pack of
    another language, and so is the case most likely to be missing something
    it needs.
    
    The bundle is pinned to a specific pre-release, so this check will need
    updating once per-language bundles are published as part of a release.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    aa3f24b View commit details
    Browse the repository at this point in the history
  3. Run the per-language bundle check on its feature branch

    Per-language bundles are not yet published as part of a release, so this
    check points at a pre-release and needs exercising before it can run on
    `main`. Allow a check to opt in to running on additional branches so that
    it can be, without opening a pull request.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    a113a2b View commit details
    Browse the repository at this point in the history
  4. Never add a per-language bundle to the toolcache

    A bundle that contains a single language can also be requested directly
    via the `tools` input, in which case we did not choose it but must still
    keep it out of the toolcache, since a later job analyzing a different
    language could otherwise pick up an installation that is missing the
    extractor it needs.
    
    Recognise such bundles by their name. When one was requested explicitly,
    a missing bundle is an error rather than a reason to fall back, since
    substituting a different bundle would ignore what was asked for.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    b877f27 View commit details
    Browse the repository at this point in the history
  5. Look for the bundle we downloaded in the toolcache

    The runner image ships with its own copy of CodeQL in the toolcache, so
    checking whether the toolcache contains CodeQL at all does not tell us
    anything about the bundle this test downloaded.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    8847921 View commit details
    Browse the repository at this point in the history
  6. Validate every per-language CodeQL bundle

    Checks that each per-language bundle is trimmed to the language it is
    for, is kept out of the toolcache, and can build a database for that
    language.
    
    This is not generated from `pr-checks`, since each language needs its own
    platform and build steps, which the generated checks cannot express.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    a1e61b1 View commit details
    Browse the repository at this point in the history
  7. Expect the Actions bundle to contain the JavaScript extractor

    The Actions QL pack depends on the JavaScript one, which is the only
    dependency of its kind, so the Actions bundle carries the JavaScript
    extractor as well as its own. Let each language declare the extractors
    its bundle is expected to contain, so that the check still fails if a
    bundle contains anything beyond what its language needs.
    
    Fold the generated Actions-only check into this workflow, which now
    covers every language, and with it the ability for a generated check to
    run on additional branches, which nothing needs any more.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    cc807b7 View commit details
    Browse the repository at this point in the history
  8. Re-run per-language bundle validation after Actions incident 5229

    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    4519edc View commit details
    Browse the repository at this point in the history
  9. Do not infer how a bundle was downloaded from its durations

    The reported durations do not distinguish a streaming attempt that failed
    from one that was never made, since a bundle that is not Zstandard skips
    streaming altogether. Telemetry from self-hosted Linux runners, which take
    the download-then-extract path consistently rather than intermittently,
    shows this is not a hypothetical case.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    e9f64a6 View commit details
    Browse the repository at this point in the history
  10. Validate the Swift bundle on a larger runner

    Swift autobuild does not finish within the timeout on a standard macOS
    runner, which is why the generated Swift checks use a larger one.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    b40dfae View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4e422c4 View commit details
    Browse the repository at this point in the history
  12. Validate against codeql-bundle-20260908

    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    73491bf View commit details
    Browse the repository at this point in the history
  13. Use a per-language bundle from a nightly when one is asked for

    Nightlies are the first bundles to contain per-language bundles, so
    allow a workflow that explicitly asks for a nightly to use one. Their
    tags record the date they were built rather than a version, so there is
    no minimum version to check against; a nightly is always at least as new
    as the first release to publish per-language bundles.
    
    Only do this when a nightly was asked for explicitly. Nightlies can also
    be forced for analyses that did not ask for one, and those should keep
    getting the bundle that contains every language while the feature is
    still being tested.
    
    Fall back to the combined bundle from the same nightly if it turns out
    not to contain the language, since we chose the bundle ourselves rather
    than being asked for it.
    
    Co-authored-by: Copilot App <[email protected]>
    Copilot-Session: d4c7b873-8278-4a36-b67c-6cc5ea3b2316
    henrymercer and Copilot committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    f8e7349 View commit details
    Browse the repository at this point in the history
Loading