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 def run(cmd): r = subprocess.run([sys.executable, AA] + cmd, capture_output=True, text=True, encoding="utf-8", env=dict(os.environ, PYTHONUTF8="1")) if r.returncode != 0: return None, (r.stderr or r.stdout).strip() return json.loads(r.stdout), None
