You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7228bb1
Browse filesBrowse the repository at this point in the historyBrowse files
feat: analyse module bodies and class bodies as functions
The module's statements outside its definitions are lowered as a function
named <module>, and a top-level class's statements outside its methods as
Cls.<body>, both carrying the span of what they stand for so their names
resolve in the right scope. Their calls are call sites, their values carry
taint and an advisory entry point called at import time is reachable.
Inside the module body, the variables the module assigns are the body's
locals: x = input(); os.system(x) connects in SSA and a module-level for
loop has a target, while functions, classes and imports stay globals for
the call graph and the symbol resolution. Wildcard imports lower to
nothing. Coverage counts the bodies; the cache format is bumped.
Regression snapshots re-recorded: 13 missing-timeout, 2 ssrf, 1
command-injection and 1 reachable-vulnerability at module level, and one
stale syntax-error entry main no longer produced.
Closes#113
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## Unreleased
4
4
5
+
### Analysis
6
+
7
+
- The module body and the bodies of top-level classes are analysed as the functions `<module>` and `Cls.<body>`: their calls are call sites, their values carry taint, and an advisory entry point called at import time or in a class body is reachable. Coverage counts them; the cache format is bumped so cached results gain their findings (#113).
8
+
5
9
### Dependencies
6
10
7
11
- Advisories distinguish the `affected_symbols` a fix changed from the public `entry_points` through which they are reached, each justified and carrying `conditions` (checkable argument values, or `semantic` ones kept as pending review); `modules` names what the package installs. Every dependency finding records its evidence `level`: `declared`, `imported`, `reachable` or `exploitable`.
0 commit comments