subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return {"deleted": False, "error": "aliyun CLI not installed", "remediation": ALIYUN_NOT_INSTALLED_REMEDIATION} try: # Destructive operation — caller must have obtained explicit user confirmation via --confirm flag. proc = subprocess.run([cli, "configure", "delete", "--profile", profile], capture_output=True, text=True, timeout=30) except (OSError, subprocess.SubprocessError) as e: return {"deleted": False, "error": f"aliyun configure delete failed: {e}"} return {- Confidence
- 80% confidence
- Finding
- This subprocess call performs a destructive local action: deleting an Alibaba Cloud CLI profile from the user's credential store. Although command injection risk is mitigated by shell=False and profile validation, the capability itself exceeds normal session-management expectations and can remove credentials or break other tooling if triggered with confirmation. In an SRE diagnostic skill, bundling credential-destruction logic increases the blast radius of mistakes or abuse.
