subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # Linux: 清理页面缓存 if os.path.exists('/proc/sys/vm/drop_caches'): subprocess.run(['sync'], check=True) with open('/proc/sys/vm/drop_caches', 'w') as f: f.write('3') except Exception as e:- Confidence
- 93% confidence
- Finding
- The subprocess call itself is not shell-injection prone because it uses a fixed argument list, but it is part of a privileged system-management action that flushes filesystem state immediately before writing to /proc/sys/vm/drop_caches. In a skill advertised for OpenClaw performance tuning, invoking system-level commands can have host-wide effects and may require elevated privileges, making accidental misuse dangerous.
