subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
raise FileNotFoundError(f"gradlew not found at {gradlew}") try: result = subprocess.run( [str(gradlew), "assembleDebug", "--no-daemon"], cwd=str(project_path), capture_output=True,- Confidence
- 84% confidence
- Finding
- This code executes `gradlew` from a generated project directory, and the project creation helper explicitly writes a placeholder `gradlew` shell/batch script. If an attacker can influence project contents or path selection, this becomes arbitrary local code execution during tests or automation because the wrapper script is treated as trusted and executed directly.
