FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Python: Add model for `unicodedata.iter_graphemes` by tausbn · Pull Request #22732 · github/codeql · GitHub

Repository navigation

Python: Add model for unicodedata.iter_graphemes - #22732

Open
tausbn wants to merge 1 commit into
mainfrom
tausbn/python315-model-unicodedata-iter-graphemes
Open

tausbn wants to merge 1 commit into
mainfrom
tausbn/python315-model-unicodedata-iter-graphemes

Conversation

tausbn commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

I think it's unlikely that this will be used in an exploit, but we treat for char in string: ... as preserving taint, so we might as well do the same for this iterator.

I think it's unlikely that this will be used in an exploit, but we treat
`for char in string: ...` as preserving taint, so we might as well do
the same for this iterator.
tausbn force-pushed the tausbn/python315-model-unicodedata-iter-graphemes branch from 14b5f6a to 94caab3 Compare October 2, 2026 13:29
tausbn marked this pull request as ready for review October 2, 2026 13:38
tausbn requested a review from a team as a code owner October 2, 2026 13:38
Copilot AI balanced review requested due to automatic review settings October 2, 2026 13:38

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot review overview

🟢 Approval recommended

The narrow model follows existing taint semantics and has focused regression coverage, with no unresolved findings.

Review effort: Balanced
Findings: None

What changed in this PR

Adds taint-flow modeling for Python 3.15’s unicodedata.iter_graphemes, consistent with existing string-iteration behavior.

Changes:

  • Propagates input-string taint to the returned iterator.
  • Adds regression cases for iteration, aliases, callbacks, bounds, and clean inputs.
  • Documents the analysis improvement.
File Description
python/​ql/​test/​library-tests/​frameworks/​stdlib/​test_unicodedata.py Tests taint propagation and negative cases.
python/​ql/​lib/​semmle/​python/​frameworks/​Stdlib.model.yml Adds the iter_graphemes taint summary.
python/​ql/​lib/​change-notes/​2026-09-30-python315-graphemes.md Records the new modeling support.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL