T09 · Insecure Skill Coding Practices
- Location
SKILL.md:20- Finding
Execution of Unverified External Migration Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-29 and 65
Vulnerability Type: Execution of scripts that are not included in the audited package and lack integrity verification
Risk Level: HighRelevant snippet (English rendering of the source instructions):
text 2. Run: python ~/.workbuddy/scripts/pack.py [output directory] [workspace root] 2. Confirm that the extraction path exists, then run: python deploy.py [workspace directory] - During testing or isolation, set MIGRATE_DEST=<target>. The only external scripts invoked are pack.py and deploy.py.Technical Analysis
The Skill instructs the Agent to execute
pack.pyfrom~/.workbuddy/scripts/anddeploy.pyfrom an extracted migration archive. Neither script is present in the audited project, which contains onlySKILL.mdand_user_meta.json. Consequently, the scripts' actual behavior, provenance, and security properties cannot be audited from this package.The instructions do not require a cryptographic signature, pinned checksum, trusted publisher, canonical-path validation, ownership check, or symlink check before execution. User confirmation of a destination path does not establish the integrity of executable code.
This creates a trust-boundary vulnerability: any process or attacker able to replace the local
pack.py, alter the migration archive, or place a maliciousdeploy.pyin the extraction directory can cause arbitrary Python code to run under the user's account.Attack Path
- An attacker or compromised local process replaces
~/.workbuddy/scripts/pack.py, tampers with a migration archive, or places a maliciousdeploy.pyin the directory selected for deployment. - The user asks the Agent to package or restore the assistant.
- The Agent obtains the documented path confirmation.
- The Agent executes the unverified Python script as instructed.
- The malicious script runs with the cu ...[truncated 1005 chars]
- An attacker or compromised local process replaces
- Remediation
View remediation
Remediation Suggestions
- Include
pack.pyanddeploy.pyin the reviewed Skill package so their behavior can be audited. - Sign release artifacts and verify their signatures against a pinned, trusted public key before execution.
- Publish and verify pinned SHA-256 checksums for both scripts and the complete migration archive.
- Resolve script paths canonically and reject symlinks, hard links, unexpected ownership, writable parent directories, and scripts located outside approved directories.
- Validate archive members before extraction and reject absolute paths, traversal sequences, links, device files, and unexpected executable content.
- Display the exact script path, digest, source, and planned file changes before requesting execution approval.
- Execute restoration in an isolated destination first and compare the resulting file manifest against an explicit allowlist.
- Enforce filesystem restrictions in code or through operating-system sandboxing rather than relying only on written instructions.
- Include
