Env Variable Harvesting
- Category
- Data Exfiltration
- Confidence
- 60% confidence
- Finding
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
- Content
python checks = [] logs = case / "test_logs" logs.mkdir() env = dict(os.environ, PYTHONDONTWRITEBYTECODE="1") def run_case(label, script, arguments, expected=0): result = subprocess.run([sys.executable, str(BUNDLE / "tools" / script), "--root", str(case), *arguments], capture_output=True, encoding="utf-8", errors="replace", timeout=180, env=env, cwd=case) filename = f"{len(checks)+1:02d}.log"
