T09 · Insecure Skill Coding Practices
- Location
SKILL.md:166- Finding
Command Injection Through Unquoted Justfile Argument Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Python setup skill is mostly coherent, but users should review it because some copied templates can execute mutable tooling and one Justfile test helper can run unsafe shell input if arguments are untrusted.
Install only if you are comfortable with the agent creating Python project config, installing dev dependencies, and adding repository git hooks. Before copying the templates into CI or shared tooling, fix the Justfile test argument handling, prefer locked or exact dependency versions, pin CI actions more strictly where required, and review any cleanup or migration command before running it.
SKILL.md:166Command Injection Through Unquoted Justfile Argument Interpolation
SKILL.md:87Executable Dependencies and CI Actions Use Mutable References
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
clean: rm -rf dist/ build/ .pytest_cache/ .ruff_cache/ htmlcov/ find . -type d -name pycache -exec rm -rf {} + 2>/dev/null || true
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
clean: rm -rf dist/ build/ .pytest_cache/ .ruff_cache/ htmlcov/ find . -type d -name pycache -exec rm -rf {} + 2>/dev/null || true
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Load .env file
set dotenv-load
# Export all variables as env vars
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
ruff clean # Clear cache ruff check --show-settings # Show resolved config ruff check --show-files # Show files to be checked ruff check --statistics # Show rule violation counts
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Platform-specific
[linux]
install:
sudo apt install libfoo-dev
[macos]
install:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# dependencies = ["httpx"]
# ///
import httpx
r = httpx.get("https://api.example.com/health")
print(f"Status: {r.status_code}")
# Bash with strict mode
The documentation recommends uvx ty check without pinning a specific version, which causes execution of the latest available ty package at runtime. Because ty is explicitly described as beta with behavior changing across minor releases, this creates a supply-chain and reproducibility risk: users may run unexpected code or experience breaking behavior simply by following the docs.
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
For untyped code, ty uses Unknown instead of Any to avoid false positives:
max_retries = None # ty infers: Unknown | None (not just None)
max_retries = 3 # no error - Unknown allows this
The example uvx ruff check . invokes a tool without pinning a version, so future executions may resolve to a newer or compromised release than the author intended. In a development/setup skill, users may copy commands directly into terminals or CI, making this a real supply-chain risk through nondeterministic tool selection.
The command uvx --with mkdocs-material mkdocs build pulls an unpinned package at execution time, which can lead to unexpected or malicious dependency resolution if upstream packages change. Because this skill is specifically for developer environment and CI setup, readers are likely to reuse this pattern in automation, increasing supply-chain exposure.
The troubleshooting example rm -rf .venv && uv sync contains a destructive deletion command without an explicit warning, which can cause accidental data loss if copied carelessly or adapted incorrectly. While limited here to a conventional virtualenv path, shell deletion patterns are inherently risky in documentation because users may modify or mis-execute them.
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation or
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation or
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation or
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.
"Object" form shall mean any form resulting from mechanical transformation or
The markdown includes a clean task that recursively deletes directories and cache artifacts using rm -rf and find ... -exec rm -rf, but the surrounding documentation does not explicitly warn that running it removes local files. Because markdown files should disclose behaviors that affect user data or system state, this destructive operation should be called out clearly.
The migration section instructs users to run rm .pre-commit-config.yaml, which deletes an existing project file, but the instructions do not clearly warn that this is a destructive change. Although the later note mentions leftover hook handling, it does not disclose the deletion risk of this config removal step itself.
No suspicious patterns detected.