pub fn detect(
unit: &FnUnit<'_>,
imports: &Imports,
span: &SpanIndex<'_>,
path: &str,
) -> Vec<RiskFeature>Expand description
Detect dynamic-code risk features in unit’s own body.
path is the source file path to embed in each emitted RiskFeature.
Returns a Vec<RiskFeature> for each dangerous dynamic-code pattern found.
The type.escape risk is intentionally NOT detected here — it is owned by
the coverage gate in analyze_unit.