Commit 1811b7b
feat(assail): exempt Julia *Ext.jl from DynamicCodeExecution (idiomatic package-extension pattern) (#71)
## Summary
Adds a small predicate at the `analyze_julia` DCE detection site that
subtracts the Julia package-extension idiom: `*Ext.jl` files and the
conventional `ext/<Name>.jl` directory layout. These files use `eval` /
`Meta.parse` legitimately as part of the language's extension mechanism.
Mirrors the shape of #53 (JSON-LD InsecureProtocol exemption) — small
guard inline at the detector, plus regression tests for the exempt and
non-exempt cases.
## Motivation
`julia-ecosystem#6` logged 209 panic-attack findings of which ~202 were
this exact pattern. Without an exemption, every Julia repo with a single
package extension produces a flood of false positives that drowns out
real findings.
## Changes
- `src/assail/analyzer.rs` (analyze_julia): guard adds
`is_julia_package_extension` check matching `*Ext.jl` / `ext/` / `/ext/`
paths before pushing the `DynamicCodeExecution` WeakPoint.
- New tests in `#[cfg(test)] mod tests`:
- `julia_ext_jl_dce_is_exempt` — \`FooExt.jl\` with \`Meta.parse\` is
exempt
- `julia_ext_dir_dce_is_exempt` — \`ext/MyExtension.jl\` with \`eval\`
is exempt
- `julia_regular_file_still_flags_eval` — non-extension file still flags
## Test plan
- [x] \`cargo test --lib julia_\` — all 3 new tests pass locally
- [ ] CI green
- [ ] Re-scan julia-ecosystem to confirm ~202 findings drop
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7935204 commit 1811b7b
1 file changed
Lines changed: 59 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4457 | 4457 | | |
4458 | 4458 | | |
4459 | 4459 | | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
4460 | 4468 | | |
4461 | | - | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
4462 | 4472 | | |
4463 | 4473 | | |
4464 | 4474 | | |
| |||
7763 | 7773 | | |
7764 | 7774 | | |
7765 | 7775 | | |
| 7776 | + | |
| 7777 | + | |
| 7778 | + | |
| 7779 | + | |
| 7780 | + | |
| 7781 | + | |
| 7782 | + | |
| 7783 | + | |
| 7784 | + | |
| 7785 | + | |
| 7786 | + | |
| 7787 | + | |
| 7788 | + | |
| 7789 | + | |
| 7790 | + | |
| 7791 | + | |
| 7792 | + | |
| 7793 | + | |
| 7794 | + | |
| 7795 | + | |
| 7796 | + | |
| 7797 | + | |
| 7798 | + | |
| 7799 | + | |
| 7800 | + | |
| 7801 | + | |
| 7802 | + | |
| 7803 | + | |
| 7804 | + | |
| 7805 | + | |
| 7806 | + | |
| 7807 | + | |
| 7808 | + | |
| 7809 | + | |
| 7810 | + | |
| 7811 | + | |
| 7812 | + | |
| 7813 | + | |
| 7814 | + | |
| 7815 | + | |
| 7816 | + | |
| 7817 | + | |
| 7818 | + | |
| 7819 | + | |
| 7820 | + | |
| 7821 | + | |
| 7822 | + | |
| 7823 | + | |
7766 | 7824 | | |
0 commit comments