T09 · Insecure Skill Coding Practices
- Location
scripts/backup.py:58- Finding
Unsafe Tar Archive Extraction Allows Writes Outside the Restore Destination
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This backup skill needs review because it claims protections like encryption and exclusions that are not actually implemented, and its restore path can write outside the chosen folder from a crafted archive.
Do not rely on this skill for sensitive or encrypted backups as published. Treat its archives as plaintext, do not restore archives you do not fully trust, do not depend on --exclude, and avoid unattended broad backups such as /home until the documentation and implementation are corrected.
scripts/backup.py:58Unsafe Tar Archive Extraction Allows Writes Outside the Restore Destination
scripts/backup.py:17Accepted Exclusion Rules Are Silently Ignored
SKILL.md:1Documented Encryption and Integrity Protections Are Not Implemented
The documentation claims security-sensitive features like AES-256 encryption, integrity verification, excludes, sync behavior, and scheduling-related use cases that static analysis indicates are not actually implemented. This is dangerous because users may rely on nonexistent protections and assume backups are encrypted or filtered when they are not, leading to data exposure or accidental inclusion of sensitive files.
The skill advertises and documents shell execution of a backup script but does not declare any tool scope such as permissions or allowed-tools. In an agent setting, undeclared shell capability increases the chance that the skill is invoked with broader execution authority than reviewers or policy expect, especially for filesystem-wide backup and restore operations.
The manifest description uses broad invocation conditions such as backing up important files, scheduled backups, sync folders, encryption, and restore scenarios without clear limits. Over-broad routing can cause the skill to be selected in situations involving sensitive or destructive file operations, increasing the likelihood of unnecessary shell execution and unsafe filesystem access.
The documentation describes restore and automated backup usage without warnings about destructive overwrite risk, broad filesystem capture, credential handling, or the dangers of unattended cron execution. In a backup/restore context, missing warnings materially increase the chance of data loss, accidental backup of sensitive material, or silent recurring execution against unintended paths.
The skill metadata and module docstring explicitly claim encryption support, but the implementation only creates and restores compressed tar archives and computes a checksum. This can cause users to back up sensitive data under the false assumption it is encrypted, resulting in plaintext-at-rest exposure if the archive is accessed by an attacker or copied from insecure storage.
The advertised security property does not exist: the code never encrypts backup contents during creation and never decrypts during restore. In the context of a backup skill intended for important and sensitive files, this mismatch is especially dangerous because users are likely to rely on the claim and store confidential data in unprotected archives.