subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
append_audit({"action": "drop_elevation", "argv": argv, "reason": "post-command"}) if args.use_sudo and args.sudo_kill_cache: sudo_bin = os.environ.get("OPENCLAW_REAL_SUDO", "/usr/bin/sudo") subprocess.run([sudo_bin, "-k"], check=False, capture_output=True, text=True) if __name__ == "__main__":- Confidence
- 84% confidence
- Finding
- subprocess.run([sudo_bin, "-k"], check=False, capture_output=True, text=True)
