You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a489ca2
Browse filesBrowse the repository at this point in the historyBrowse files
Fix#206: use fully unconstrained extensionTargets ('*') for all languages (#212)
* fix: use open-ended extensionTargets floors instead of exact pins (#206)
Root cause of #206: extensionTargets is exact-pinned to whatever
codeql/<lang>-all version this repo's CI happens to test against, and
re-pinned on every CLI bump. Unlike a normal dependencies: mismatch
(which fails loudly at install time), an unsatisfied extensionTargets
constraint makes the CLI silently drop the entire extension pack - zero
data-extension rows applied, only a low-visibility
WARNING: ... is unused, job stays green. Any drift between this repo's
tested CLI version and a consumer's actual CLI version turns into silent,
undetected loss of coverage. Confirmed via local CLI testing, a genuine
GHCR registry install, and a real hosted GitHub Actions default-setup run.
By contrast, a genuinely unsatisfiable dependencies: constraint fails
hard (ERROR: No valid pack solution found...), and even a
stale/incompatible dependencies pin on the CLI-bundled codeql/<lang>-all
itself is harmless - the CLI always resolves that dependency to whatever
-all it actually bundles regardless of the declared range, and any real
incompatibility then surfaces as an ordinary QL compile error. So
extensionTargets is the only mechanism with this silent failure mode -
confirmed empirically with isolated dependency-resolution tests.
Changes (piloting on Java first):
- java/ext and java/ext-library-sources: extensionTargets changed from an
exact pin (9.2.2) to an open-ended floor (>=9.2.2, no upper bound).
Verified this resolves correctly against CLI 2.26.2's bundled
java-all 9.2.2, and continues to work as the CLI/bundle moves forward.
- pin-codeql-library-versions.sh: excludes */ext and
*/ext-library-sources from its auto-repin loop entirely, so a routine
CLI bump can never silently re-tighten an extensionTargets floor back to
an exact version. Query/library pack dependencies: pinning is
unchanged - that serves a different purpose (preventing codeql pack
upgrade from resolving unconstrained '*' deps to registry-latest).
- update-codeql-version.yml: updated comments/PR body text to reflect the
narrower scope of the auto-repin step.
- CONTRIBUTING.md: documents the new extensionTargets floor policy in a
new warning box, cross-referenced from the existing ext-packs-no-install
note.
Other languages (csharp, go, python) still use an exact extensionTargets
pin pending the same conversion in follow-up work.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f02ef23b-e35d-4536-bd58-f2fbc2976ba9
* fix: use unconstrained extensionTargets ('*') for all languages, not a version floor
Supersedes the earlier Java-only, version-floor approach with the correct
fix, based on further investigation:
- Extends the fix to all 4 languages that have ext/ext-library-sources
packs (java, csharp, go, python), not just java.
- Uses fully unconstrained extensionTargets: '*' instead of a version
floor ('>=X.Y.Z'). A floor only protects consumers on newer CLIs;
consumers on older CLIs below the floor would still be silently
dropped - the same bug, just shifted.
- Git archaeology on java/ext/qlpack.yml shows '*' was the original,
intentional design for ~2.9 years (Sept 2023-July 2026) until PR #166's
CLI-bump automation blindly regex-replaced every codeql/<pkg>: version
line - dependencies: and extensionTargets: alike - across all 4
languages, with no distinction between the two. This was an
unintentional regression, not a deliberate compatibility fix.
- extensionTargets never participates in codeql pack install/upgrade's
registry dependency resolution (confirmed empirically: no lock-file
entry is ever generated for it), so '*' here cannot 'fetch latest' the
way an unconstrained dependencies: entry would - it only means 'apply
regardless of which <lang>-all version is in play'.
- Dedicated research across all 4 languages' ExternalFlowExtensions.qll
history in github/codeql found exactly one genuine breaking change,
ever: neutralModel gained a kind column in both Java and C#
(codeql/java-all and codeql/csharp-all 0.6.2, CodeQL CLI v2.13.3, May
2023). Go and Python have never had a breaking change. Even that one
break fails loudly (QL compile error), never silently - so this repo's
own CI is a sufficient tripwire for any future break, without needing
a preemptive floor.
Also:
- pin-codeql-library-versions.sh and update-codeql-version.yml comments
updated to describe the '*' decision (was previously written to
describe a version-floor approach that was never actually correct).
- Added a short protective comment above extensionTargets: in all 6
qlpack.yml files explaining what happens if it's ever pinned/floored
again, so a future manual edit doesn't reintroduce #206.
Fixes#206
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f02ef23b-e35d-4536-bd58-f2fbc2976ba9
0 commit comments