Commit 033fbe6
committed
fix(analyzer): rely on runner for SC7 example filtering to close executable bypass
SC7 called is_code_example() with an unconditional continue, letting a nearby example marker (e.g. a '# for example' comment a few lines from a content-trust bypass) suppress the rule in executable files. The shared runner already filters examples in non-executable docs and only downweights executables, so the analyzer-level call was redundant and created an attacker-controlled bypass. Drop it and rely on the runner's file-type-aware handling; add an executable-file evasion regression test. Addresses review feedback on #224.
Signed-off-by: CharmingGroot <ohyes9711@gmail.com>1 parent 2b15280 commit 033fbe6
2 files changed
Lines changed: 21 additions & 7 deletions
File tree
- src/skillspector/nodes/analyzers
- tests/nodes/analyzers
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
590 | 592 | | |
591 | 593 | | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | 594 | | |
596 | 595 | | |
597 | 596 | | |
| |||
601 | 600 | | |
602 | 601 | | |
603 | 602 | | |
604 | | - | |
| 603 | + | |
605 | 604 | | |
606 | 605 | | |
607 | 606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
| |||
0 commit comments