subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if auth_log.exists(): try: content = subprocess.run(['sudo', 'tail', '-200', str(auth_log)], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=5).stdout for line in content.split('\n'): if 'Accepted' in line or 'session opened' in line:- Confidence
- 91% confidence
- Finding
- This code invokes `sudo tail /var/log/auth.log` to read privileged authentication logs from the host. In a skill advertised as an OpenClaw security panel, collecting host-level auth records exceeds the expected scope, may trigger privileged access, and exposes sensitive login metadata that could be rendered into generated reports.
