T09 · Insecure Skill Coding Practices
- Location
index.js:37- Finding
Path Traversal Through Unsanitized Test Names Enables File Access Outside the Tests Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This A/B testing skill is mostly coherent, but its CLI can escape its intended test-storage folder and read or overwrite other JSON files the user can access.
Review before installing. The skill does not show deception or exfiltration, but use only trusted test names and avoid running it in directories or accounts that can access sensitive JSON files until path validation and dependency pinning are fixed.
index.js:37Path Traversal Through Unsanitized Test Names Enables File Access Outside the Tests Directory
The description says to use the skill whenever a user wants to test content, measure performance, or make data-driven decisions, which is broad enough to trigger in many unrelated contexts. Overly broad invocation criteria can cause the agent to select this skill unnecessarily, leading to irrelevant tool use, unintended data handling, or actions taken without the user explicitly requesting A/B testing.
This code contains user-facing and instructional natural language in Chinese comments such as the section headers, while the rest of the CLI is in English and there is no indication that the skill is intentionally region-specific. The policy requires avoiding forced language/locale behavior without user opt-in or clear justification.
The dependency uses a caret range, which permits automatic installation of newer minor/patch releases rather than a single audited version. This weakens supply-chain integrity because builds are not fully reproducible and a later compromised or vulnerable upstream release could be pulled in without review.
"author": "",
"license": "MIT",
"dependencies": {
"commander": "^12.0.0",
"chalk": "^4.1.2",
"fs-extra": "^11.2.0"
}
The chalk dependency is not pinned and is allowed to float within the semver range, which is especially risky here because there is a known advisory affecting some chalk releases. Without exact version pinning and a lockfile, installs may resolve to an affected or malicious version, creating a supply-chain exposure.
"license": "MIT",
"dependencies": {
"commander": "^12.0.0",
"chalk": "^4.1.2",
"fs-extra": "^11.2.0"
}
}
The manifest references chalk without pinning an exact version, while static analysis notes a known malicious-package advisory for chalk. Because the exact installed release cannot be verified from this manifest alone, consumers may resolve to an affected version, making this a real supply-chain risk.
The fs-extra dependency is specified with a caret range, so different environments may install different code over time. That lack of determinism increases the chance of silently ingesting a vulnerable or compromised release from the package ecosystem.
"dependencies": {
"commander": "^12.0.0",
"chalk": "^4.1.2",
"fs-extra": "^11.2.0"
}
}
No suspicious patterns detected.