refactor(appsec): move LFI RASP protection to a dedicated filesystem contrib module - #19705
refactor(appsec): move LFI RASP protection to a dedicated filesystem contrib module#19705florentinl wants to merge 1 commit into
Conversation
…contrib module Extracts LFI (Local File Inclusion) exploit prevention out of the shared _common_module_patches.py wrapper into ddtrace/appsec/_contrib/filesystem/, using the Subscriber/event pattern instead of inline wrapt wrapping. The shared _must_block helper moves to ddtrace/appsec/_rasp.py so both the new filesystem subscriber and the remaining _common_module_patches.py wrappers (SSRF/SHI/CMDI/SQLI) depend on it without cross-importing from _common_module_patches.py. Also fixes a stack-trace frame-cropping regression in _exploit_prevention/stack_traces.py where a stale/renamed crop_stack name silently skipped internal-frame stripping.
|
Circular import analysis
|
Dependency direction analysis📈 Existing violations got worse1 pre-existing violation(s) increased in severity (e.g. their target became more depended-on, or got pulled into an import cycle), though the edge itself isn't new:
|
Codeowners resolved asResolved from the full PR diff against |
BenchmarksBenchmark execution time: 2026-08-14 15:01:08 Comparing candidate commit d8eab22 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 83 metrics, 0 unstable metrics. scenario:iastaspectsospath-ospathbasename_aspect
|
Summary
_common_module_patches.pyinto a dedicatedddtrace/appsec/_contrib/filesystem/module using theSubscriber/event pattern._must_blockhelper intoddtrace/appsec/_rasp.py._exploit_prevention/stack_traces.pyintroduced earlier in this branch.changelog/no-changelogapplies.