Skip to content

feat: Extend reflexive methods with additional string operations#1825

Merged
gotbadger merged 2 commits into
Bearer:mainfrom
ShakedPeretz:feat/extend-python-reflexive-methods
Sep 3, 2025
Merged

feat: Extend reflexive methods with additional string operations#1825
gotbadger merged 2 commits into
Bearer:mainfrom
ShakedPeretz:feat/extend-python-reflexive-methods

Conversation

@ShakedPeretz

Copy link
Copy Markdown
Contributor

Description

This PR extends the reflexiveMethods list in the Python analyzer (pkg/languages/python/analyzer/analyzer.go) to include additional string transformation methods such as lower, upper, strip, lstrip, rstrip, capitalize, title, swapcase, casefold, and expandtabs.

By doing this, the SAST engine will more accurately track user-controlled data through these transformations, resulting in improved detection of vulnerabilities (e.g., path traversal) even when user input is manipulated with these methods

@gotbadger
gotbadger merged commit 3a762f7 into Bearer:main Sep 3, 2025
5 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.

4 participants