Skip to content

JS: Add taint steps for trimStart, trimEnd and normalize - #22853

Merged
asgerf merged 1 commit into
github:mainfrom
ku-plrg:js/string-trim-normalize
Oct 21, 2026
Merged

asgerf merged 1 commit into
github:mainfrom
ku-plrg:js/string-trim-normalize

Conversation

@stonechoe

Copy link
Copy Markdown
Contributor

The list of string methods in StringManipulationTaintStep contains trimLeft and trimRight. It does not contain their standard names, trimStart and trimEnd. It also does not contain normalize. All three methods return text from the receiver.

This change adds the three names to the list. They are in alphabetical order. toWellFormed stays at the end of the list, as before.

sink(source().trimStart());        // Before: no flow. After: taint flow.
sink(source().trimEnd());          // Before: no flow. After: taint flow.
sink(source().normalize("NFC"));   // Before: no flow. After: taint flow.

@stonechoe
stonechoe requested a review from a team as a code owner October 20, 2026 12:53
Copilot AI max review requested due to automatic review settings October 20, 2026 12:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@asgerf asgerf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! LGTM

@asgerf
asgerf merged commit 00fd5ae into github:main Oct 21, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants