Tainted flow: 'WORKSPACE' from os.environ.get (line 17, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
# Fallback: try grep print("No FTS5 matches. Trying grep fallback...") import subprocess result = subprocess.run( ["grep", "-rl", "-m5", query, WORKSPACE], capture_output=True, text=True, env={"HOME": os.environ.get("HOME", os.path.expanduser("~"))}- Confidence
- 72% confidence
- Finding
- WORKSPACE comes from an environment variable and is passed directly to grep as a path to recursively search. In a skill context that may process sensitive local data, an attacker who can influence the environment could cause the fallback search to read and enumerate files outside the intended workspace boundary, broadening data exposure.
