subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return env_token # Fallback: try gh CLI try: result = subprocess.run( ["gh", "auth", "token"], capture_output=True, text=True, timeout=5, )- Confidence
- 95% confidence
- Finding
- The code invokes the local `gh` CLI to retrieve an authentication token, which expands the skill's access from explicit inputs to locally stored credentials. In an agent skill, this is dangerous because running the skill can silently consume a user's ambient GitHub credentials and use them for outbound API access without clear consent or necessity.
