Skip to content

Python: Port UseOfExit.ql#21603

Open
tausbn wants to merge 1 commit intomainfrom
tausbn/python-port-use-of-exit
Open

Python: Port UseOfExit.ql#21603
tausbn wants to merge 1 commit intomainfrom
tausbn/python-port-use-of-exit

Conversation

@tausbn
Copy link
Copy Markdown
Contributor

@tausbn tausbn commented Mar 27, 2026

A very simple port using API graphs.

@tausbn tausbn added the no-change-note-required This PR does not need a change note label Apr 7, 2026
@tausbn
Copy link
Copy Markdown
Contributor Author

tausbn commented Apr 7, 2026

DCA alert changes look good. 173 new true positives! (I think the points-to modelling of site.Quitter was just somewhat broken.)

@tausbn tausbn marked this pull request as ready for review April 7, 2026 21:50
@tausbn tausbn requested a review from a team as a code owner April 7, 2026 21:50
Copilot AI review requested due to automatic review settings April 7, 2026 21:50
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

Ports the py/use-of-exit-or-quit query to use the ApiGraphs API-based call matching, replacing the legacy points-to approach.

Changes:

  • Replaced LegacyPointsTo dependency with semmle.python.ApiGraphs.
  • Updated the query predicate to identify calls to the built-in exit/quit via API::builtin(...).getACall().asCfgNode().
Show a summary per file
File Description
python/ql/src/Statements/UseOfExit.ql Migrates call matching from legacy points-to to API graphs for detecting exit()/quit() usage.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants