Back to skill

Security audit

Free Resource

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent media-search downloader, but its download commands are under-scoped and can fetch arbitrary URLs or write to arbitrary local paths.

Review this before installing if the agent may process untrusted URLs or run in a sensitive network. Use environment variables instead of config.json when possible, only download URLs copied from trusted provider responses, and choose output paths in a dedicated media folder to avoid overwriting important files.

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 (4)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pexels.ts:107
Finding
Unrestricted Pexels Download URL Enables SSRF and Arbitrary File Overwrite<![CDATA[ ## Vulnerability Details **File Location**: `scripts/pexels.ts:107-116`, invoked by `scripts/pexels.ts:181-191` **Vulnerability Type**: Server-Side Request Forgery and unrestricted file write **Risk Level**: Medium ### Vulnerable Code ```ts async function downloadFile(url: string, output: string): Promise<void> { const resp = await fetch(url, { headers: { "User-Agent": "PexelsCLI/0.1" }, }); if (!resp.ok) { console.error(`Download failed - HTTP ${resp.status}`); process.exit(1); } const buf = await resp.arrayBuffer(); await Bun.write(output, new Uint8Array(buf)); console.error(`Downloaded: ${output}`); } ``` ```ts async function download(flags: Record<string, string>) { if (!flags["--url"]) { console.error("Error: --url is required"); process.exit(1); } if (!flags["--output"]) { console.error("Error: --output is required"); process.exit(1); } await downloadFile(flags["--url"], flags["--output"]); } ``` ### Technical Analysis The `download` command passes a caller-controlled URL directly to `fetch`. It does not enforce HTTPS, restrict downloads to Pexels media hosts, resolve and reject non-public addresses, or validate redirect destinations. Consequently, the command can make HTTP requests to loopback addresses, private network services, link-local services, or cloud metadata endpoints. This network access exceeds the minimum privilege required to download media returned by Pexels. The caller also fully controls the output path. `Bun.write` can overwrite files writable by the current process, and the implementation does not restrict writes to a designated media directory or reject existing files. ### Attack Path 1. An attacker supplies a URL presented as a Pexels media resource. 2. The Agent invokes `pexels.ts download` with the attacker-controlled `--url`. 3. The script requests an internal target such as a loopback service, private network host, or metadata endpoint. 4. The response is writt ...[truncated 811 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Parse the supplied URL with `new URL()` and permit only `https:`. - Allowlist the exact Pexels API and documented Pexels media/CDN hostnames required by the Skill. - Resolve hostnames before connecting and reject loopback, private, link-local, multicast, unspecified, and reserved IPv4 and IPv6 ranges. - Disable automatic redirects or validate the protocol, hostname, and resolved address of every redirect target. - Prefer downloading URLs taken directly from a validated Pexels API response rather than accepting arbitrary URLs. - Restrict output to a dedicated download directory after canonicalizing the path. - Reject path traversal, symbolic-link escapes, and existing files unless overwrite is explicitly requested. - Apply response-size and timeout limits to prevent memory and disk exhaustion. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pixabay.ts:90
Finding
Unrestricted Pixabay Download URL Enables SSRF and Arbitrary File Overwrite<![CDATA[ ## Vulnerability Details **File Location**: `scripts/pixabay.ts:90-97`, invoked by `scripts/pixabay.ts:178-188` **Vulnerability Type**: Server-Side Request Forgery and unrestricted file write **Risk Level**: Medium ### Vulnerable Code ```ts async function downloadFile(url: string, output: string): Promise<void> { const resp = await fetch(url); if (!resp.ok) { console.error(`Download failed – HTTP ${resp.status}`); process.exit(1); } const buf = await resp.arrayBuffer(); await Bun.write(output, new Uint8Array(buf)); console.error(`Downloaded: ${output}`); } ``` ```ts async function download(flags: Record<string, string>) { if (!flags["--url"]) { console.error("Error: --url is required"); process.exit(1); } if (!flags["--output"]) { console.error("Error: --output is required"); process.exit(1); } await downloadFile(flags["--url"], flags["--output"]); } ``` ### Technical Analysis The Pixabay downloader accepts an arbitrary URL and sends it directly to `fetch`. No protocol, hostname, resolved-address, or redirect validation is performed. Although the declared functionality is downloading Pixabay media, the implementation can contact any destination reachable from the execution environment. The output path is also unrestricted. The complete response is buffered in memory and then written with `Bun.write`, potentially replacing an existing file that the process can modify. ### Attack Path 1. An attacker causes an Agent or user to process a crafted download URL. 2. The URL identifies an internal HTTP service, private address, localhost listener, or cloud metadata endpoint rather than a Pixabay media host. 3. `pixabay.ts download` requests that destination. 4. The response is saved to a caller-selected path. 5. The saved response can be exposed if it is later read by the Agent, while the arbitrary path can also be used to overwrite writable files. ### Impact Assessment An attacker can use the Skill proces ...[truncated 420 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require HTTPS and allowlist only the Pixabay media and download hostnames needed for normal operation. - Validate DNS results and reject private, loopback, link-local, reserved, multicast, and unspecified addresses for both IPv4 and IPv6. - Validate every redirect destination before following it. - Bind downloads to URLs obtained from a recent, validated Pixabay API response where practical. - Canonicalize output paths and confine them to an explicitly configured media directory. - Prevent symbolic-link traversal and refuse to replace existing files by default. - Stream downloads to disk with maximum-size, timeout, and content-type controls instead of buffering arbitrary responses entirely in memory. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/freesound.ts:86
Finding
Freesound Token Is Forwarded to an Unvalidated Download URL<![CDATA[ ## Vulnerability Details **File Location**: `scripts/freesound.ts:86-101`, called with credentials at `scripts/freesound.ts:246-253` **Vulnerability Type**: Credential disclosure through unvalidated outbound destination **Risk Level**: Medium ### Vulnerable Code ```ts async function downloadFile(url: string, output: string, token?: string): Promise<void> { const headers: Record<string, string> = { "User-Agent": "FreesoundCLI/0.1" }; if (token) { headers["Authorization"] = `Token ${token}`; } const resp = await fetch(url, { headers }); if (!resp.ok) { console.error(`Download failed – HTTP ${resp.status}`); process.exit(1); } const buf = await resp.arrayBuffer(); await Bun.write(output, new Uint8Array(buf)); console.error(`Downloaded: ${output}`); } ``` ```ts // Get download URL const data = await apiRequest(`/sounds/${id}/download/`, {}, token); if (!data.download_link) { console.error("Error: No download link returned. Note: OAuth2 may be required for original file downloads."); process.exit(1); } await downloadFile(data.download_link, flags["--output"], token); ``` ### Technical Analysis The `download-original` path retrieves `download_link` from an API response and passes it to `downloadFile` together with the Freesound token. `downloadFile` unconditionally adds the token to the `Authorization` header whenever the optional token argument is present. The destination URL is not checked to confirm that it uses HTTPS or belongs to an approved Freesound-controlled origin. Therefore, a malformed or compromised API response can cause the token to be transmitted to another host. The implementation also does not explicitly enforce safe behavior for cross-origin redirects. The regular preview-download path does not pass the token to `downloadFile`; the credential exposure is specific to the original-download implementation. ### Attack Path 1. The user or Agent invokes the `download-original` command. 2. The s ...[truncated 902 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Parse and validate `download_link` before making the request. - Require HTTPS and allowlist the exact Freesound origins authorized to receive the token. - Do not attach an Authorization header to CDN or cross-origin URLs unless Freesound documentation explicitly requires it and the destination is allowlisted. - Disable automatic redirects for credential-bearing requests or manually follow redirects only after revalidating each destination. - Explicitly remove Authorization on any cross-origin transition. - Implement the documented OAuth2 flow for original-file downloads instead of treating a basic API token as interchangeable with OAuth2 authorization. - Document the `download-original` command or remove it if original downloads are not a supported feature. - Apply the same output-path and response-size protections recommended for the other download functions. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:17
Finding
Plaintext API Credentials Stored in an Unprotected Project Configuration File<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-43` and `config.example.json:1-14` **Vulnerability Type**: Insecure plaintext secret storage guidance **Risk Level**: Low ### Vulnerable Configuration Guidance ```bash # 1. Copy config template and fill in your API keys cp config.example.json config.json # 2. Edit config.json with your API keys ``` ```json { "pexels": { "api_key": "YOUR_PEXELS_API_KEY" }, "pixabay": { "api_key": "YOUR_PIXABAY_API_KEY" }, "freesound": { "api_token": "YOUR_FREESOUND_TOKEN" }, "jamendo": { "client_id": "YOUR_JAMENDO_CLIENT_ID" } } ``` The supplied template itself contains empty values and does not expose real credentials: ```json { "pexels": { "api_key": "" }, "pixabay": { "api_key": "" }, "freesound": { "api_token": "" }, "jamendo": { "client_id": "" } } ``` ### Technical Analysis The documented setup encourages users to store all provider credentials in a plaintext `config.json` file under the project directory. The audited project contains no `.gitignore` entry protecting that filename, and the instructions do not require owner-only filesystem permissions. This creates a risk that credentials will be committed to source control, included in project archives, exposed through backups, or read by other local users when file permissions are permissive. The scripts support environment variables, but the Quick Start presents the plaintext file as the primary setup method. ### Attack Path 1. A user follows the Quick Start and places active API credentials in `config.json`. 2. The project directory is committed, shared, archived, backed up, or exposed with permissive local file permissions. 3. Another party obtains the plaintext configuration. 4. The exposed provider credentials are reused until revoked or rotated. ### Impact Assessment Exposed keys can be used to consume API quotas and perform any operation available to the corresponding creden ...[truncated 334 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Prefer environment variables or an operating-system secret store over a project-local plaintext file. - Add `config.json` and other local secret files to `.gitignore`. - Provide a checked-in `.gitignore` rule rather than relying on each user to configure one. - If file-based configuration remains supported, instruct users to create it with owner-only permissions, such as mode `0600` on Unix-like systems. - Check configuration-file permissions at runtime and warn or fail when the file is accessible to other users. - Clearly warn that active keys must never be committed, uploaded, or included in support bundles. - Recommend provider-side least-privilege credentials and immediate rotation after suspected exposure. - Avoid passing secrets through CLI flags where possible because command-line arguments may be visible to other local processes or retained in shell history. ]]>
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (39)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description claims a unified tool for searching and retrieving royalty-free media across four providers and multiple media types: photos/videos (Pexels, Pixabay), audio effects (Freesound), and music/BGM (Jamendo). The code chunk only implements Pexels functionality via /search and /videos/search plus a generic file download command. There is no evidence of Pixabay, Freesound, or Jamendo API usage, nor any support for audio effects or music discovery. While the implemented Pexels photo/video search and download behavior fits part of the declaration, the overall declared description materially overstates the breadth of providers and media types supported by this code chunk, so this is a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The code’s core behavior is narrower than the declared description. The description presents a unified royalty-free media tool across four providers and multiple media types, including audio/music sources, but this code chunk only supports Pixabay image and video search plus downloading a file by URL. The Pixabay-related portion of the description is accurate, including search filters and download functionality, but the broader multi-provider/media-library claim is not represented by this code. This is a material description-behavior mismatch because major declared capabilities and providers are absent from the implementation shown.

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/jamendo.ts search --query "background" --limit 5
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/freesound.ts search --query "piano"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pexels.ts search-photos --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pexels.ts search-photos --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pexels.ts search-photos --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pexels.ts search-photos --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pexels.ts search-photos --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pixabay.ts search-images --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pixabay.ts search-images --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pixabay.ts search-images --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun ./scripts/pixabay.ts search-images --query "nature"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/freesound.ts:33

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/pexels.ts:32

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/pixabay.ts:33