Back to skill

Security audit

p-image-ideogram

Security checks for vulnerabilities and agentic risk

Overview

The skill’s image-generation behavior is coherent, but it needs Review because it repeatedly recommends unpinned remote skill installs via npx.

Before installing, review the remote Pruna skill dependencies and prefer pinned commits or verified releases instead of running the documented unpinned `npx ... -y` commands. Use the skill only if you are comfortable sending prompts to Pruna’s API with your `PRUNA_API_KEY`.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding
Unpinned Third-Party Package Installation Commands## Vulnerability Details **File Location**: `SKILL.md`, lines 16–20 **Vulnerability Type**: Supply-chain risk from unpinned remote dependencies **Risk Level**: Medium ### Vulnerable Code ```markdown | `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` | | `image-prompting` | Use when crafting still-image prompts for any generative model — composition, identity sheets, edits, try-on, and photoreal personas. | `npx skills add PrunaAI/pruna-skills@image-prompting -y` | | `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` | Or install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y` ``` ### Technical Analysis The skill instructs users or agents to invoke `npx` and install content from the remote `PrunaAI/pruna-skills` repository without pinning the `npx` CLI package or the remote repository to an immutable release or commit hash. The symbolic selectors such as `@generation-diversity` identify skill content but do not establish an immutable, cryptographically verified dependency version. `npx` can retrieve and execute package code during invocation. Consequently, the code that runs at installation time may differ from the code reviewed during this audit. The `-y` option suppresses interactive confirmation, further reducing the opportunity to inspect an unexpected package or changed dependency before execution. No evidence was found that the referenced dependencies are currently malicious. The vulnerability is the unsafe dependency acquisition pattern and the resulting exposure to repository compromise, account takeover, malicious package publication, dependency confusion, or an upstream supply-chain incident. ### Attack Path 1. An attacker com ...[truncated 1389 chars]
Remediation
## Remediation Suggestions 1. Pin the `npx` CLI package to a reviewed, exact version rather than allowing `npx` to resolve the latest available release. 2. Pin `PrunaAI/pruna-skills` to an immutable commit hash or cryptographically signed release instead of a mutable selector. 3. Verify downloaded content against a trusted checksum or signature before installation. 4. Remove `-y` from security-sensitive installation instructions so users can review the resolved source and version. 5. Prefer a lockfile-backed installation workflow with integrity metadata where the tooling supports it. 6. Document the expected repository owner, immutable revision, package digest, and verification procedure. 7. Run dependency installation in a sandbox with minimal filesystem access, no unnecessary secrets, restricted outbound networking, and non-administrative privileges. 8. Review and update pinned revisions through a controlled dependency-update process that includes source review and automated supply-chain scanning.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (16)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
Use with **`p-image-ideogram`** when a **`vertical-*`** workflow (or any brief) implies a job type. **SSoT for knobs:** `thinking`, `image_size`, prompt form (natural language vs Ideogram JSON), and batch discipline. **Agent default:** **`thinking: high`**, **`prompt_upsampling: true`**. Set **`prompt_upsampling: false`** for JSON prompts, locked on-image copy, or verbatim wording.

**Before POST:** list exact on-image strings in the plan; pick the profile below; show prompt + knobs unless the user locked wording.

## Profiles
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The skill instructs the agent to run `npx skills add ...` to fetch and execute remote package code at install time, but the referenced runner/package is not pinned to an exact immutable version. This creates a supply-chain risk: if the resolver, tag, or package contents change upstream, an agent could install and execute unexpected code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
This line invokes `npx skills add` for a remote skill dependency without pinning the executed tool/package to an immutable version. Because `npx` may download and run code dynamically, a compromised or changed upstream package could lead to arbitrary code execution in the agent environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The skill dependency installation command relies on `npx skills` without an exact pinned version for the executed package. In agent environments, this is dangerous because transient dependency resolution can change over time and may execute malicious or unintended code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The 'install full suite' command uses `npx skills add` with floating execution semantics, exposing the environment to supply-chain compromise if the fetched tool or its dependencies are altered. This is a real risk because installation implicitly trusts and executes external package code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
This alternate-skill installation instruction again uses unpinned `npx skills`, preserving the same remote code execution and supply-chain exposure. Repetition across the document increases the chance an agent or user follows one of these unsafe install paths.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The command installs another remote skill via dynamically resolved `npx skills`, which can execute changed upstream code. In a skill file that is meant to be followed operationally by agents, this is a genuine supply-chain vulnerability rather than just documentation noise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
This line repeats the same unpinned remote-install pattern for `p-image-try-on`. Because `npx` fetches executable code on demand, an attacker controlling or poisoning the package source could gain code execution in the environment.

External Transmission

Medium
Category
Data Exfiltration
Content
### Create (async — recommended)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-ideogram' \
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 (async — recommended)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-ideogram' \
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
### Create (async — recommended)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-ideogram' \
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The typical-next-steps section continues to recommend unpinned `npx skills` installation of remote components. This broadens the attack surface by normalizing repeated ad hoc package execution throughout the workflow.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The command at this line triggers the same supply-chain issue: remote package execution through unpinned `npx`. If an agent follows it automatically, the result can be arbitrary code execution or environment compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
This installation example remains vulnerable because it depends on dynamically fetched executable tooling rather than fixed artifacts. In a security review context, this is a real vulnerability due to the possibility of upstream tampering or dependency confusion.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
The skill recommends another unpinned `npx skills` invocation, which is unsafe in automated environments because it delegates trust to live registry resolution. This can be exploited for malicious package substitution or altered transitive dependencies.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding
This is the same documented unpinned execution pattern, and therefore a true supply-chain vulnerability. The cumulative context of many such commands makes the skill more dangerous because it conditions users/agents to repeatedly fetch executable code from external sources.

Static analysis

No suspicious patterns detected.