Skip to main content

pattern_is_subset

Function pattern_is_subset 

Source
pub fn pattern_is_subset(child: &str, parent: &str) -> bool
Expand description

Check if child pattern is a subset of parent pattern.

A pattern is a subset if every address it matches is also matched by the parent. Simple heuristic: check segment-by-segment prefix match with wildcard handling.

See pentest CAP-10: Pattern Wildcard Injection, PAT-04: pattern_is_subset Edge Cases