Tainted flow: 'API_KEY' from os.environ.get (line 8, credential/environment) → subprocess.Popen (code execution)
Medium
- Category
- Data Flow
- Content
ffmpeg = subprocess.Popen(ffmpeg_cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) # websocat websocket ws = subprocess.Popen([ "websocat", WS_URL, "-t", "-H", f"xi-api-key: {API_KEY}" ], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)- Confidence
- 96% confidence
- Finding
- The API key is interpolated into the websocat command line header, which can expose the secret to other local processes or users via process inspection tools. In a CLI skill context, this is more dangerous because agent tooling may run on shared developer machines, CI runners, or multi-user hosts where command-line secrets are observable.
