Repository navigation
Commit 5ee48ef
fix(analyzer): detect bound shell truthiness (#577)
* test(analyzer): define shell truthiness core contract
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): detect bound shell truthiness
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): harden bound shell facts
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): honor shell argument evaluation order
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): invalidate effectful subprocess receivers
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): invalidate receiver trust after generic calls
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): reconcile bound shell ownership
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): reconcile true-prefixed shell ownership
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): invalidate nested RHS receiver effects
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): invalidate unsupported eager receiver effects
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): track eager receiver state
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): preserve lexical TM1 when dataflow abstains
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): require a retained companion owner
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): preserve execution scope in binding evidence
Signed-off-by: Christopher Kevin <[email protected]>
* test(analyzer): distinguish deferred abstention from lexical signal
Signed-off-by: Christopher Kevin <[email protected]>
* style(analyzer): simplify binding event deduplication
Signed-off-by: Christopher Kevin <[email protected]>
* fix: preserve runtime and retained shell evidence
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): preserve called-slot identity and cached method evidence
Signed-off-by: Christopher Kevin <[email protected]>
* fix: preserve cached subprocess slot state across scoped imports
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): reconcile explicit cached-slot evidence across scopes
Signed-off-by: Christopher Kevin <[email protected]>
* fix: abstain from cached slot proof after eager effects
Signed-off-by: Christopher Kevin <[email protected]>
* test: retain lexical findings after unknown cached-slot effects
Signed-off-by: Christopher Kevin <[email protected]>
* fix: bound direct called-slot evidence to known execution order
Signed-off-by: Christopher Kevin <[email protected]>
* fix: limit direct slot proof to single assignment targets
Signed-off-by: Christopher Kevin <[email protected]>
* fix: invalidate slot evidence on protocols and unsafe releases
Signed-off-by: Christopher Kevin <[email protected]>
* fix: keep legacy shadow proof isolated from later effects
Signed-off-by: Christopher Kevin <[email protected]>
* fix: abstain from cached replacement proof after unknown effects
Signed-off-by: Christopher Kevin <[email protected]>
* fix: retain native callable detection across cached slot stores
Signed-off-by: Christopher Kevin <[email protected]>
* fix: retain shell findings for native receiver assignments
Signed-off-by: Christopher Kevin <[email protected]>
* fix: preserve native Popen replacement warnings
Signed-off-by: Christopher Kevin <[email protected]>
* fix(analyzer): require proven replacement before revoking lexical TM1
Address the three remaining review findings on lexical TM1 reconciliation,
where a bound shell=True call still ran natively but lost its HIGH finding:
- Untaken expression stores: a walrus in a short-circuited BoolOp operand,
an untaken conditional-expression arm, or a comprehension/generator body
is no longer recorded as replacement evidence. Only constant operands
and tests prove that the store executed.
- Identity-preserving stores: unpacked targets are paired with their RHS
elements. Self-stores are transparent, truthy constants keep the flag,
and native receiver aliases (saved = subprocess, import subprocess as
saved, Popen = subprocess.Popen) keep the native receiver.
- Deferred bodies: an outer store only proves replacement when every
invocation the owner scope can reach sees it. Any reference to the
function, method or class (compound statements, main guards, callbacks,
other bodies) can invoke it from that point on, and decorators or
lambdas can run once defined. This also covers a re-import before a
later invocation.
The release-trigger test for a called function now matches its
module-level twin: the companion abstains and the lexical HIGH remains.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test: account for TM1 Python parsing in marker ownership ledger
Main's #784 test expects the tool-misuse ledger event for an invalid
Python file to carry obfuscated_instruction_text. This PR makes tool
misuse parse Python for TM1 reconciliation, so the runner's
higher-precedence syntax_error now names that partial event. Keep the
fail-closed contract: assert the marker reading through the lexical-only
anti-refusal analyzer and keep tool misuse partial with syntax_error.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Christopher Kevin <[email protected]>
Co-authored-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>1 parent 8777636 commit 5ee48ef
9 files changed
Lines changed: 5565 additions & 172 deletions
File tree
- src/skillspector/nodes/analyzers
- tests/nodes
- analyzers
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| 919 | + | |
| 920 | + | |
919 | 921 | | |
920 | 922 | | |
921 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
435 | 444 | | |
436 | 445 | | |
437 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | | - | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
0 commit comments