(rel_path: str, allowlist: list[str])
| 587 | |
| 588 | |
| 589 | def match_allowlist(rel_path: str, allowlist: list[str]) -> bool: |
| 590 | # Support exact matches or glob patterns |
| 591 | return any(pat == rel_path or fnmatch.fnmatch(rel_path, pat) for pat in allowlist) |
| 592 | |
| 593 | |
| 594 | # ----------------------------- |