T09 · Insecure Skill Coding Practices
- Location
scripts/generate_attestation.mjs:162- Finding
Checksum Sidecar Write Follows Symbolic Links
- Content
View full analysis
.sha256` is a symbolic link, the program truncates and overwrites the link target with checksum text using the privileges of the account running the generator. Exploitation requires the attacker to be able to create or replace directory entries in the attestation output directory. The risk becomes more significant if the generator is invoked by a more privileged account or through a recurring scheduled job with `--write-sha256`. ### Attack Path 1. An attacker obtains write access to the attestation output directory. 2. The attacker creates `current.json.sha256` as a symbolic link to another file writable by the account that runs the Skill. 3. The operator or a scheduled process invokes: ```bash node scripts/generate_attestation.mjs --write-sha256 ``` 4. The generator calls `fs.writeFileSync()` on the symbolic-link path. 5. Node follows the link and truncates the target file. 6. The target is replaced with a line containing the generated digest and filename. ### Impact Assessment The vulnerability permits file corruption with the privileges of the invoking user. It does not independently provide arbitrary file contents or code execution because the written content is constrained to checksum text. However, it can overwrite any file that the in ...[truncated 380 chars]- Remediation
View remediation
