Back to skill

Security audit

pruna-api

Security checks for vulnerabilities and agentic risk

Overview

This API helper matches its stated purpose, but it needs Review because some documented commands could expose an API key or install mutable dependencies without enough user review.

Install only if you are comfortable with Pruna/Replicate processing uploaded media remotely and with paid API calls. Before use, pin and verify the installer and skill source where possible, avoid auto-confirmed installs, and do not send PRUNA_API_KEY to any download URL unless the URL and redirects are validated as trusted Pruna endpoints.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/pruna-api.md:101
Finding
Pruna API Key May Be Disclosed to an Untrusted Delivery URL## Vulnerability Details **File Location**: `references/pruna-api.md`, lines 101–109 **Vulnerability Type**: Credential disclosure through an unvalidated response-controlled URL **Risk Level**: High **Relevant Code**: ```bash ## Download output {#download} `-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)). ```bash curl -L -H "apikey: ${PRUNA_API_KEY}" \ "GENERATION_URL_FROM_STATUS" \ -o output.bin ``` ``` The associated authentication guidance at lines 9–12 states: ```bash Send your API key in the **`apikey`** header on every request (not `Authorization: Bearer`). ```bash -H "apikey: ${PRUNA_API_KEY}" ``` ``` ### Technical Analysis The documented download command attaches `PRUNA_API_KEY` to a `generation_url` obtained from an API response without first validating the URL's scheme, hostname, port, or redirect destination. The use of `curl -L` enables redirect following. Because `apikey` is a custom header rather than a standard authentication option with clearly defined cross-origin stripping behavior, relying on curl to protect it across redirects is unsafe. More directly, if the original `generation_url` itself points to an unexpected host, the key-bearing request is immediately sent to that host. An attacker who can compromise, spoof, or otherwise influence the status response could return an attacker-controlled delivery URL. The documented workflow would then transmit the Pruna API key to the attacker. ### Attack Path 1. The agent creates and polls a Pruna prediction. 2. An attacker compromises or influences the API response path, or supplies a crafted status response containing a malicious `generation_url`. 3. The malicious URL points directly to an attacker-controlled HTTPS server or redirects to one. 4. The agent follows the documented command and invokes `curl -L`. 5. The request carries the `apikey: ${PRUNA_API_KEY}` ...[truncated 605 chars]
Remediation
## Remediation Suggestions 1. Parse the returned URL before issuing a request. 2. Require an `https` scheme and an explicit allowlisted hostname, such as `api.pruna.ai`, before attaching `PRUNA_API_KEY`. 3. Reject unexpected ports, embedded user information, IP-literal hosts, malformed URLs, and non-HTTPS schemes. 4. Do not send the Pruna API key to third-party object-storage or CDN URLs. If the API returns a signed external delivery URL, download it without the `apikey` header. 5. Avoid unrestricted redirect following on authenticated requests. Validate every redirect destination or disable redirects and process them manually. 6. Separate authenticated API downloads from unauthenticated signed-URL downloads. For example: ```bash # Only after parsing and confirming that the host is exactly api.pruna.ai: curl --proto '=https' \ -H "apikey: ${PRUNA_API_KEY}" \ "$VALIDATED_PRUNA_URL" \ -o "$CONFIRMED_OUTPUT_PATH" # For a validated provider-issued signed external URL: curl --proto '=https' \ "$VALIDATED_SIGNED_URL" \ -o "$CONFIRMED_OUTPUT_PATH" ``` 7. Document that checking whether a URL is merely relative is insufficient; absolute URLs and all redirect targets must also be validated.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:13
Finding
Unpinned Package Execution and Mutable Skill Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 13–20 **Vulnerability Type**: Unpinned third-party dependency and automatically confirmed installation **Risk Level**: Medium **Relevant Code**: ```markdown ## Install | Skill | Description | Install | | --- | --- | --- | | `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` | | `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` | ``` The full-suite installation at line 65 uses the same pattern: ```markdown Or install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y` ``` ### Technical Analysis The installation commands invoke `npx skills` without pinning the CLI package to a specific version or integrity digest. Depending on the local environment and package-manager behavior, `npx` can retrieve and execute the currently published package version. The referenced Skill content is also not pinned to an immutable commit hash in the documented command. The identifiers after `@` identify requested Skill content but do not demonstrate immutable source pinning. Consequently, the effective content installed in the future may differ from the content reviewed during this audit. The `-y` option automatically confirms the operation, reducing the opportunity for the user to inspect the resolved source, version, and requested changes before installation. No evidence shows that the current upstream package is malicious. The issue is that the documented installation process leaves a supply-chain path through which a future compromised registry release, upstream repository, account, or mutable reference could introduce altered code or instructions. ### At ...[truncated 1264 chars]
Remediation
## Remediation Suggestions 1. Pin the `skills` CLI to a reviewed exact version instead of invoking an unspecified current release: ```bash npx skills@EXACT_REVIEWED_VERSION add ... ``` 2. Pin installed Skill content to an immutable commit hash or cryptographically verified release rather than a mutable repository state. 3. Record and verify package integrity hashes or signatures where the package manager and distribution mechanism support them. 4. Remove `-y` from security-sensitive installation instructions so users can inspect the resolved package, source, and changes. 5. Prefer a lockfile-backed installation process with reproducible dependency resolution. 6. Download and audit the resolved Skill files before enabling them, particularly scripts, hooks, manifests, and instructions that can trigger tool execution. 7. Document the expected package publisher, repository URL, exact version, commit, and integrity value so users can detect dependency confusion or account compromise.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (26)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to run `npx skills add ...` without pinning the `skills` package itself to a specific version. Because `npx` resolves and executes the latest matching package at runtime, a future compromised or incompatible release could execute unreviewed code during installation, creating a supply-chain risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This installation command relies on unpinned `npx skills`, which causes runtime retrieval of code that may change over time. If the upstream package is hijacked or publishes a malicious update, users following the skill documentation could execute attacker-controlled code locally.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill recommends `npx skills` as the installer for related skills without pinning the executable package version. In an agent-skill ecosystem, install instructions are especially sensitive because they may be copied verbatim into trusted environments, increasing exposure to supply-chain compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
Using unpinned `npx skills` means the command may execute different code in the future than was reviewed when this skill was published. That creates a realistic supply-chain risk if the package is updated maliciously or a dependency is compromised.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This command references `npx skills` without version pinning, so users may execute a newer unreviewed package release. Since `npx` downloads and runs packages directly, exploitation could lead to arbitrary code execution on the host performing installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The unpinned installer command is a true supply-chain weakness because the package resolved by `npx` is not fixed. In practice, this means documentation consumers may run different code over time, undermining reviewability and allowing malicious upstream changes to propagate.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This line instructs installation via an unpinned `npx skills` invocation, which exposes users to package substitution or malicious update risk. The skill context makes this somewhat more dangerous because it is specifically meant to be installed before API-related operations, encouraging broad reuse in automation contexts.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
Because `npx skills` is not pinned, the install path is nondeterministic and can silently change after publication. An attacker who compromises the package or publishing account could leverage these instructions to gain code execution in user or CI environments.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The related-skill installation example again uses unpinned `npx skills`, preserving the same supply-chain exposure. Repetition across the file increases the chance that users will follow at least one unsafe command, especially when installing multiple companion skills.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This is a true vulnerability because it advises direct execution of an unpinned package via `npx`, which is a known risky pattern. If exploited, it could result in arbitrary local code execution during skill installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The command remains vulnerable to upstream tampering because `npx` resolves the installer dynamically. In documentation for agent skills, this matters because automated or semi-automated consumers may execute these examples with limited scrutiny.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This line repeats the unsafe pattern of using `npx skills` without a fixed version, creating a supply-chain attack surface. The impact is medium because exploitation depends on an upstream compromise, but successful exploitation could still yield arbitrary code execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The full-suite install command also uses unpinned `npx skills`, so even bulk installation inherits the same package-execution risk. Because this command likely has wider appeal than single-skill installs, it may broaden the blast radius if the upstream package is compromised.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Privacy / external transmission

Local images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.

- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).
- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
for scene in 1 2 3 4 5; do
  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \
    -H 'Content-Type: application/json' \
    -H "apikey: ${PRUNA_API_KEY}" \
    -H 'Model: p-video-avatar' \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Create + poll

```bash
# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions
# Body: {"input": { ... }}

# Poll GET on response.urls.get until status == succeeded
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.