Skip to content

Potential fix for code scanning alert no. 354: Incomplete string escaping or encoding#33384

Merged
aleksei-semikozov merged 1 commit into26_1from
alert-autofix-354
Apr 23, 2026
Merged

Potential fix for code scanning alert no. 354: Incomplete string escaping or encoding#33384
aleksei-semikozov merged 1 commit into26_1from
alert-autofix-354

Conversation

@aleksei-semikozov
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/DevExpress/DevExtreme/security/code-scanning/354

Use complete regex escaping for each allowlist token before joining into an alternation.
Best fix: replace the $-only escape with a standard “escape all regex metacharacters” expression:

  • From: s.replace(/\$/g, '\\$')
  • To: s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')

This preserves current behavior for existing names while correctly handling backslashes and all other regex-significant characters.
Edit only packages/devextreme/eslint-scheduler-allowlist.mjs at the export constructing schedulerMemberAllowlistRegex (line region around 129–130). No new imports or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Aleksei Semikozov <alwexy@gmail.com>
@aleksei-semikozov aleksei-semikozov marked this pull request as ready for review April 23, 2026 11:38
Copilot AI review requested due to automatic review settings April 23, 2026 11:38
@aleksei-semikozov aleksei-semikozov self-assigned this Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Addresses code scanning alert #354 (“Incomplete string escaping or encoding”) by fully escaping scheduler allowlist tokens before composing them into a regex used by ESLint naming convention filtering.

Changes:

  • Replace $-only escaping with standard “escape all regex metacharacters” logic when building schedulerMemberAllowlistRegex.

@aleksei-semikozov aleksei-semikozov merged commit 2d155d0 into 26_1 Apr 23, 2026
107 checks passed
@aleksei-semikozov aleksei-semikozov deleted the alert-autofix-354 branch April 23, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants