T09 · Insecure Skill Coding Practices
- Location
scripts/uf2.sh:47- Finding
Unescaped User Input Allows JSON Request-Body Injection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a straightforward uf2.net URL-shortener wrapper, with disclosed API-key use and remote link management, but users should note the credential-storage and input-escaping weaknesses.
Install only if you are comfortable giving the skill a uf2.net API key and having submitted URLs become public short links with public metadata. Prefer a secret store or OS credential manager over shell-profile storage, double-check link codes before deletion, and avoid passing untrusted strings with quotes or control characters until the script uses proper JSON encoding.
scripts/uf2.sh:47Unescaped User Input Allows JSON Request-Body Injection
SKILL.md:73Documentation Recommends Plaintext API-Key Persistence Without Permission Enforcement
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Option 3: System keychain/credential manager
# macOS Keychain, Linux Secret Service, Windows Credential Manager
# Use OS-native secure storage
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).
DELETE /links/{code}
X-API-Key: uf2_...
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# uf2.net URL Shortener
Create and manage short URLs via the uf2.net API. This skill provides a CLI wrapper for the uf2.net service (https://uf2.net), an API-first URL shortener designed for automation and bots.
## Quick Start
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
If you don't have a uf2.net account:
curl -X POST https://uf2.net/api/v1/accounts/register \
-H "Content-Type: application/json" \
-d '{"username":"your-username"}'
The script builds JSON manually from unescaped user-controlled values and then transmits it to an external service with the user's API key. Special characters in the URL, slug, or title can break JSON structure or alter request fields, causing malformed requests or unintended data submission to the remote API.
[[ -n "$title" ]] && body="$body,\"title\":\"$title\""
body="$body}"
curl -s -X POST "$API_BASE/links" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d "$body"
The delete command performs an irreversible remote deletion via an HTTP DELETE request, but there is no confirmation prompt, warning message, or explanatory comment/docstring disclosing that action to the user at execution time. For a destructive operation in a code file, this falls under missing user warnings.
This markdown file describes a delete operation but does not explicitly warn that deleting a short link is destructive or potentially irreversible. Under the markdown criteria, behaviors affecting user data or service state should include a clear warning so users understand the impact before invoking the command.