Skip to content

fix: preserve literal input and static asset boundaries - #2757

Merged
DeusData merged 2 commits into
mainfrom
codex/codeql-main-alerts
Oct 25, 2026
Merged

DeusData merged 2 commits into
mainfrom
codex/codeql-main-alerts

Conversation

@DeusData

@DeusData DeusData commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Main CodeQL analysis succeeds, but its open-alert gate fails on ten existing JavaScript findings. This change addresses the affected input handling without changing the scanning scope or alert gate.

  • Treat project names literally in browser hand-test patterns, escape graph node IDs in CSS selectors, and compare transport identifiers as tokens, including $ identifiers.
  • Extract XML facts from the original input and preserve word boundaries when removing markup from repository prose.
  • Restrict smoke-server assets to both their lexical and resolved roots, reject escaping symlinks, and return a controlled response for malformed URL encoding.

Validation: the first eight fixes reproduced 11 deterministic regression failures twice, and reverting the fixes restored those failures. The remaining two locator fixes likewise reproduced 11 failures twice, passed after the fix, and failed again on revert. The final affected batch passes all 75 tests across five files. Changed JavaScript modules passed syntax checks, and git diff --check is clean.

Hosted checks on head e30dd59 are green: dco, ci-ok, test-ui (including the production UI build and the new unit tests), test-windows-guards, and CodeQL javascript-typescript. The CodeQL analysis of the PR merge commit reports 0 open alerts. No alerts are dismissed or suppressed.

Escape project names before building hand-test patterns, compare transport
identifiers as literal tokens, preserve boundaries when extracting prose
and XML facts, and require canonical containment for smoke static assets.
Add regression coverage for metacharacters, dollar identifiers, markup
joining, traversal, symlinks, and malformed URL encoding.

Signed-off-by: Martin Vogel <[email protected]>
@DeusData

Copy link
Copy Markdown
Owner Author

Added the remaining architecture hand-test fixes in e30dd59. Graph node IDs now escape backslashes, quotes, and control characters in CSS selectors, and the project chooser treats project names as literal text instead of regular expressions.

The new cases reproduced 11 failures twice before the fix; removing the fix restored the same failures. With the fix restored, all 75 affected tests across five files pass. JavaScript syntax checks and the diff whitespace check also pass. Hosted CodeQL still needs to confirm the result; the PR remains a draft while those checks run.

Thanks for reviewing these fixes and helping improve the CI checks.

@DeusData
DeusData marked this pull request as ready for review October 25, 2026 17:39
@DeusData
DeusData merged commit 869fc2b into main Oct 25, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant