Skip to content

feat: factory instances, loop else and match - #55

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/factories-match-loop-else
Sep 4, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/factories-match-loop-else

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

The last gaps found on the twelve repositories under tests-project/, after reading the silent ones by hand.

  • Tests first (test: define factory instances, loop else and match), implementation follows.
  • Factory instances: a module-level app = create_app() whose callee is a project function, in the module or in another file through the project index, is treated as an instance of what the function's summary returns (return_externals), so app.route resolves to flask.Flask.route and the routes are entry points. MiniBookApiServer creates its application that way; its /img/<name> route passes the parameter to send_file through a helper, a path traversal the analyzer now reports.
  • Loop else clauses: the CFG sends the exhausted loop to the else block and break past it, so taint reaching the clause is seen and a break skips it.
  • match statements: kept in the HIR with their patterns and laid out by the CFG builder as an if chain over a hidden subject, for literal, singleton, capture, wildcard and or-patterns with guards; sequence, mapping and class patterns are reported per function as unsupported. Flask-Image-Editing-Website was blocked entirely by one match; it is now analysed and reports a hardcoded credential.
  • The builder test that used loop else as its unsupported example now uses yield from and starred assignment targets.

All twelve repositories now analyse with no syntax note at all.

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 4, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit b738001 into main Sep 4, 2026
6 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/factories-match-loop-else branch September 4, 2026 11:26
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.

1 participant