Repository navigation
Decode remote config files as UTF-8 - #4323
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
There are no active review issues for the change to decode remote CodeQL configurations as UTF-8.
No open issues 🎉
What changed in this PR
This PR aligns remote CodeQL configuration loading with the local loader by decoding files as UTF-8, preserving Unicode names and path filters.
Changes:
- Replaces binary decoding with UTF-8 decoding for remote configuration files.
- Adds regression tests for ASCII, Unicode, emoji, and escaped YAML values with configuration validation enabled and disabled.
- Documents the fix and updates the generated JavaScript bundle.
| File | Description |
|---|---|
unreleased-change-notes/fix-remote-config-utf8.md |
Documents the remote configuration decoding fix. |
src/config/file.ts |
Decodes remote configuration content as UTF-8. |
src/config/file.test.ts |
Tests preservation of configuration names and path filters. |
lib/entry-points.js |
Generated bundle reflecting the TypeScript change. |
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.
Decode remote config files as UTF-8, matching the local loader. Fixes corrupted Unicode names and paths, including paths that silently skip source files or fail to exclude them.
Verified with 1,230 tests and CodeQL 2.20.7/2.27.4 runs; the Unicode-path repro restores code-injection findings from 1 to 4.
Raw Latin-1 bytes now produce UTF-8 replacement characters, as they already do for local files.