Repository navigation
Commit 9a938f3
fix(taint): drop forwarded-kwargs fan-out and keep source and message semantics
Address the fourth review round.
- A forwarded **kwargs (a function's own ** parameter passed on) binds
only into the callee's own ** parameter: one slot per callee, and it
never fills named, keyword-only or receiver parameters. This removes
the per-name expansion (up to 85 targets per **k) and the false
positives from one tainted keyword reaching every forwarded one.
- A source call's value is what it reads, not its arguments, so
json.load(open(os.getenv(...))) is TT4 again, as on main.
- Sinks cite variables main's flows taint (phase A) before parameters
only the new flows bind, so same-rule messages keep main's wording.
- A class-body read of a name the class binds reads a view fed by the
module and class keys; the class attribute keeps only the class's own
value. Any class-body binding (annotated assignment, import, def)
shadows a base's value; an annotation alone binds nothing.
- An immediately called lambda in a default yields its body's value.
- C3 merges every base and caps only the result.
- Deadline checks per argument and keyword in bind_arguments and every
1,024 flows of one key in drain.
- CHANGELOG: exact fingerprints are version-bound; list every message
change category and raised rule.
Tests pin each case, add non-root nested-default and many-base scaling
shapes, the forwarded-kwargs cost, the slot-cap boundary for *rest, the
multi-base ancestor cap, C3 local precedence, and non-constructor
self()/cls() calls.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 78b571c commit 9a938f3
3 files changed
Lines changed: 509 additions & 155 deletions
File tree
- src/skillspector/nodes/analyzers
- tests/nodes/analyzers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments