T09 · Insecure Skill Coding Practices
- Location
SKILL.md:7- Finding
Execution of an Unverified External Local Validator
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: T09: Insecure Skill Coding Practices
Risk Level: MediumVulnerable code snippet:
text Locate the active skills root and run `<skills-root>/.groundcrew/groundcrew-doctor.py --evidence <record.json>` before using them in a conclusion.Technical Analysis
The skill requires the agent to locate an “active skills root” dynamically and execute
groundcrew-doctor.pyfrom that location. The referenced program is not included in the audited project, and the instruction does not define:- A canonical, trusted installation path
- Expected file ownership or permissions
- A cryptographic hash or signature
- A trusted package or release source
- Rejection of user-writable or otherwise untrusted roots
Consequently, the security of the execution depends on an external filesystem location that was not part of this audit. If root discovery selects an attacker-controlled or writable directory, a malicious file placed at
.groundcrew/groundcrew-doctor.pycould be executed as though it were the legitimate validator.This is an insecure external-tool invocation rather than confirmed embedded malicious code: the audited project contains no executable scripts or malicious payload.
Attack Path
- An attacker gains write access to a directory that can be selected as the active skills root.
- The attacker creates or replaces
.groundcrew/groundcrew-doctor.pywith a malicious Python program. - The skill processes an evidence record and directs the agent to run the validator.
- The agent resolves the ambiguous skills root to the attacker-controlled directory.
- The malicious program executes with the privileges and environment available to the agent process.
- The program can access resources available under those privileges, subject to operating-system and sandbox restrictions.
Impact Assessment
Successful exploitation could provide arbitrary local code execu ...[truncated 485 chars]
- Remediation
View remediation
Remediation Suggestions
- Bundle the validator in the reviewed skill package or install it through a fixed, trusted distribution mechanism.
- Resolve the validator through a canonical path rather than dynamically searching for an active skills root.
- Verify the validator’s cryptographic hash or signature against a pinned trusted value before every execution.
- Check that the validator and all parent directories have trusted ownership and are not writable by untrusted users.
- Refuse execution when the validator is absent, duplicated across candidate roots, symlinked outside the trusted installation, or fails integrity checks.
- Invoke the interpreter and arguments directly without shell interpolation.
- Validate and canonicalize the evidence-record path, and pass it as a discrete argument.
- Run the validator with minimal filesystem, environment, credential, and network access.
- Document the trusted source, supported version, expected permissions, and fail-closed behavior.
