subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""Clone the repository for analysis""" if os.path.exists(self.local_path): subprocess.run(['rm', '-rf', self.local_path], check=True) subprocess.run(['git', 'clone', '--depth=1', self.repo_url, self.local_path], check=True) def analyze_structure(self) -> Dict[str, Any]: """Analyze repository structure and extract components"""- Confidence
- 95% confidence
- Finding
- The code invokes `git clone` on a user-supplied repository URL, which performs network access and causes untrusted repository content to be fetched into the local filesystem. In a skill context, this expands the trust boundary and can expose the host to abuse through arbitrary external resource access, oversized repositories, private-network targeting via git transports, and analysis of attacker-controlled content.
