subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # 获取启动Activity result = subprocess.run( ['adb', '-s', device_serial, 'shell', 'cmd', 'package', 'resolve-activity', '--brief', package_name], capture_output=True, text=True,- Confidence
- 88% confidence
- Finding
- This call passes `package_name` into `adb shell cmd package resolve-activity`, which executes within a remote shell context on the Android device. Even though Python is not spawning a local shell, untrusted values sent through `adb shell` can still trigger device-side argument or shell interpretation issues, making this a real injection surface if `package_name` is attacker-controlled.
