Skip to content

test(security): escape backslash too when building the IDE-version regex (CodeQL #1144) - #16832

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/codeql-1144-escape-backslash
Oct 16, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/codeql-1144-escape-backslash

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Fixes CodeQL #1144 (js/incomplete-sanitization) in tests/unit/oauth-providers-config.test.ts:586.

The regex source was built with .replace(/\./g, "\\."), which escapes dots but not backslashes. It now uses the full metacharacter escape /[.*+?^${}()|[\]\\]/g. Test-only change; the input is the constant ANTIGRAVITY_IDE_FALLBACK_VERSION, so no production code moves.

Validation: the file runs 26/26 with a hermetic env (env -u OMNIROUTE_API_KEY, fresh DATA_DIR); eslint and prettier are clean.

⚠️ base-red inherited: #15306

@github-actions

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

@diegosouzapw
diegosouzapw merged commit 16d2ab2 into release/v3.8.52 Oct 16, 2026
31 of 50 checks passed
@diegosouzapw
diegosouzapw deleted the fix/codeql-1144-escape-backslash branch October 16, 2026 14:29
diegosouzapw added a commit that referenced this pull request Oct 24, 2026
…tifier match (CodeQL #1166, #1167) (#18057)

tests/unit/icon-map-object-values.test.ts builds its \bNAME\b matchers through one identifierRe() helper that escapes every regex metacharacter (same pattern as #16832), clearing CodeQL js/incomplete-sanitization #1166 and #1167. Test-only; 3/3.
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