printing-press-import
Audited by Socket on Oct 9, 2026
2 alerts found:
SecurityAnomalyThe code implements a filesystem import operation and contains no clear malware, data theft, or obfuscation. It has a meaningful security risk because untrusted API_SLUG input is used directly in rm -rf and mv paths without validation, allowing unintended overwrites or deletion through path traversal. Restrict API_SLUG to a validated single safe path component and verify resolved paths remain under PRESS_HOME before destructive operations.
The code implements a legitimate local backup function and contains no clear malware, exfiltration, persistence, or obfuscation. However, API_SLUG is used directly in source and output paths, creating a path traversal risk. Restrict the slug to an expected character set, such as [A-Za-z0-9._-], reject absolute paths and .. components, and validate that resolved source paths remain beneath PRESS_HOME. The archive filename should also be constructed from a sanitized slug.