Quarantine Scan Dir Tool
quarantine_scan_dir_toolDetect Python module shadowing and obfuscated code in a directory before executing scripts. Identifies files mimicking standard library modules to prevent supply chain attacks.
Instructions
Scan a directory for Python module shadowing attacks and obfuscated code.
Detects files that shadow Python stdlib modules (e.g. struct.py, os.py) — a supply chain attack vector where running Python in a directory loads the attacker's module instead of the real one. Also runs L1+L2 on each .py file to detect embedded injection.
Use this BEFORE running any Python code in a directory extracted from an archive, cloned from an untrusted repo, or downloaded from the web.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | Path to the directory to scan |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||