Repository navigation
Fix additive packs for the selected language - #4314
Open
theinfosecguy wants to merge 1 commit into
Open
theinfosecguy wants to merge 1 commit into
theinfosecguy wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the fix that applies additive query packs to the job’s selected language.
No open issues 🎉
What changed in this PR
Fixes CodeQL Action’s additive packs handling so extra query packs apply to the job’s selected language, rather than the first language in a shared configuration.
Changes:
- Passes selected languages into configuration generation and handles missing language entries.
- Adds regression coverage for shared configurations, key ordering, and array-form packs.
- Updates the generated bundle and adds a release note.
| File | Description |
|---|---|
unreleased-change-notes/fix-pack-language-merge.md |
Documents the additive packs fix. |
tests/multi-language-repo/.github/codeql/codeql-config-packaging3.yml |
Adds Ruby packs before JavaScript to exercise language selection. |
src/config/db-config.ts |
Merges additive packs into the selected language’s entry. |
src/config-utils.ts |
Passes selected languages to configuration generation. |
src/config-utils.test.ts |
Tests shared-config merging through initialization. |
src/codeql.test.ts |
Covers key ordering, missing or empty entries, and array-form packs. |
lib/entry-points.js |
Updates the generated JavaScript bundle. |
Review effort: Balanced (auto)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge
+packsinto the job’s selected language instead of the first key in a shared config. This prevents added queries from being silently skipped. Includes regression tests.Verified with 1,232 tests and CodeQL 2.20.7/2.27.4 runs. The bundled command-injection repro on 2.27.4 reports 0 findings before the fix and 1 afterward.