docker-pro-diagnostic
Fail
Audited by Socket on Feb 16, 2026
1 alert found:
Obfuscated FileObfuscated Filelog_processor.py
HIGHObfuscated FileHIGH
log_processor.py
The script's intent is benign: fetch docker logs and surface error-like lines with surrounding context. There is no evidence of deliberate malicious functionality. However, it contains a significant command-injection vulnerability because it interpolates an unvalidated container name into a shell command passed to subprocess.run with shell=True. This constitutes a serious security risk if untrusted input can reach the script. Additional issues include brittle deduplication and mixing stderr/stdout without preserving ordering. Recommended fixes: remove shell=True and pass args as a list, validate container names, improve deduplication, and correct the syntax error in the main invocation.
Confidence: 98%
Audit Metadata