Back to skill

Security audit

uf2.net URL Shortener

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/uf2.sh:47
Finding

Unescaped User Input Allows JSON Request-Body Injection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:73
Finding

Documentation Recommends Plaintext API-Key Persistence Without Permission Enforcement

Content
View full analysis
> ~/.zshrc # or ~/.bashrc for bash ``` ``` ### Technical Analysis The documentation recommends persisting the uf2.net API key directly in a shell initialization file and describes this option as “user-only access.” The command neither verifies nor enforces restrictive permissions on the target file. Shell profiles are plaintext files and may be exposed through permissive filesystem modes, backups, synchronization software, diagnostic bundles, editor recovery files, or other local processes operating under the user's account. The document also recommends stronger alternatives, including a secret store and an operating-system credential manager. However, presenting plaintext profile storage as user-only without a permission check can lead users to assume protections that the command itself does not establish. ### Attack Path 1. A user follows the documented command and writes the API key to `~/.zshrc` or `~/.bashrc`. 2. The profile has permissive access, is copied into a backup or synchronization system, or is collected by local tooling. 3. An unauthorized party or compromised process obtains the plaintext key. 4. The attacker sends authenticated requests to the uf2.net API using the stolen key. 5. The attacker can perform operations authorized for the corresponding account until the key is revoked or rotated. ### Impact Assessment A disclosed API key can allow unauthorized access to the associated uf2.net account capabilities documented by the project. These include viewing account information, listing links, creating links, and deleting owner-controlled links. The impact is limited to the permissions granted by the uf2.net API key; the reviewed material does not establ ...[truncated 42 chars]
Remediation
View remediation
> ~/.zshrc ``` File permissions reduce exposure to other local users but do not protect the secret from processes running as the same user, backups, or plaintext disclosure. A dedicated secret manager remains the recommended solution. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

Option 3: System keychain/credential manager

bash
# macOS Keychain, Linux Secret Service, Windows Credential Manager
# Use OS-native secure storage

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

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).

Content

Scanner excerpt · references/api.md (reported line 129)May include surrounding context.

Delete Link

http
DELETE /links/{code}
X-API-Key: uf2_...

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
# 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

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

If you don't have a uf2.net account:

bash
curl -X POST https://uf2.net/api/v1/accounts/register \
  -H "Content-Type: application/json" \
  -d '{"username":"your-username"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

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.

Content

Scanner excerpt · scripts/uf2.sh (reported line 56)May include surrounding context.

sh
[[ -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"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.