Commit 64731af
fix(analyzers): rely on runner for example filtering in E5 and TM4 (#237)
E5 (#218) and TM4 (#220) called is_code_example() with an unconditional continue, letting a nearby example marker (e.g. "# for example") suppress findings 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 — the same issue fixed for SC7 in #224. Remove it from both analyzers; replace TM4's analyze-level doc-exclusion test with an executable-evasion test and add the equivalent E5 regression.
Signed-off-by: CharmingGroot <ohyes9711@gmail.com>
Co-authored-by: Narendran Raghavan <32655573+rng1995@users.noreply.github.com>1 parent d2f1832 commit 64731af
4 files changed
Lines changed: 27 additions & 17 deletions
File tree
- src/skillspector/nodes/analyzers
- tests
- nodes/analyzers
- unit
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
361 | | - | |
362 | | - | |
| 360 | + | |
363 | 361 | | |
364 | 362 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | 363 | | |
369 | 364 | | |
370 | 365 | | |
| |||
374 | 369 | | |
375 | 370 | | |
376 | 371 | | |
377 | | - | |
| 372 | + | |
378 | 373 | | |
379 | 374 | | |
380 | 375 | | |
| |||
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | | - | |
| 325 | + | |
327 | 326 | | |
328 | 327 | | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | 328 | | |
333 | 329 | | |
334 | 330 | | |
| |||
338 | 334 | | |
339 | 335 | | |
340 | 336 | | |
341 | | - | |
| 337 | + | |
342 | 338 | | |
343 | 339 | | |
344 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1322 | 1326 | | |
1323 | 1327 | | |
1324 | 1328 | | |
| |||
0 commit comments