T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Execution of Unbundled Scripts Through Unsafe Relative Paths
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 34–75
Vulnerability Type: Execution of unverified code outside the audited Skill package
Risk Level: MediumVulnerable Code
bash # SKILL.md:34 python3 ../../scripts/create_product_repo.py "My Extension" --publish-type prototype-local --git-init # SKILL.md:51 python3 ../../scripts/validate_release_profile.py /path/to/product-repo/extension.release.json # SKILL.md:57 python3 ../../scripts/generate_release_plan.py /path/to/product-repo/extension.release.json # SKILL.md:63 python3 ../../scripts/generate_store_listing.py /path/to/product-repo/extension.release.json # SKILL.md:69 python3 ../../scripts/generate_design_brief.py /path/to/product-repo/extension.release.json # SKILL.md:75 python3 ../../scripts/execute_release_cycle.py /path/to/product-repo/extension.release.jsonTechnical Analysis
The Skill instructs the Agent to execute several Python scripts through the relative path
../../scripts/. The audited project contains onlySKILL.mdandagents/openai.yaml; none of the referenced scripts are included in the package.Relative paths are resolved from the process's current working directory, not necessarily from a trusted or verified Skill root. Consequently, the identity and contents of the executed scripts depend on the environment in which the commands are run. The
../..traversal also directs execution outside the audited project boundary.If an attacker can create or replace files in the resolved parent
scriptsdirectory, the documented commands can execute attacker-controlled Python code. Because Python scripts run without isolation by default, such code receives the same operating-system privileges and environmental access as the Agent or user invoking the command. If the expected external scripts are absent, the immediate benign outcome is workflow failure rather than code execution.Attack Path
- An ...[truncated 1528 chars]
- Remediation
View remediation
Remediation Suggestions
- Include all required scripts inside a reviewed directory within the Skill package, such as
scripts/, rather than relying on files outside the project. - Resolve script locations from a trusted, canonical Skill root instead of the current working directory.
- Canonicalize each path and verify that it remains within the expected package directory before execution.
- Reject missing scripts rather than searching for or implicitly trusting similarly named files elsewhere.
- Pin released script contents using package signatures or cryptographic hashes and verify integrity before execution.
- Run release tooling with least privilege in a restricted environment that exposes only the required product repository and excludes unnecessary credentials.
- Document the trusted source, version, and expected digest of every external tool if bundling is not possible.
- Prefer a fixed invocation pattern such as
python3 "$VERIFIED_SKILL_ROOT/scripts/execute_release_cycle.py" ..., whereVERIFIED_SKILL_ROOThas been canonicalized and validated.
- Include all required scripts inside a reviewed directory within the Skill package, such as
