Back to skill

Security audit

Miroprism

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent multi-agent review workflow, but it should go to Review because it reuses untrusted artifact and reviewer text verbatim in later agent prompts while overstating its prompt-injection protection.

Install only if you are comfortable with a skill spawning multiple reviewers over your project and writing review records under analysis/miroprism. Treat outputs as advisory, use the digest-review pause for sensitive work, and avoid running it on hostile artifacts unless the host agent has strong prompt-injection isolation and least-privilege limits.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:573
Finding
Untrusted Artifact and Reviewer Content Is Inserted Verbatim into Agent Prompts## Vulnerability Details **File Location**: `SKILL.md:573-591` **Vulnerability Type**: Prompt injection through unsafe prompt composition **Risk Level**: High ### Vulnerable Code ```text You are the [ROLE NAME] in Round 2 of a MiroPRISM review. In Round 1, you reviewed [ARTIFACT DESCRIPTION] and produced the findings below. You are now receiving a sanitized digest of ALL Round 1 findings from all reviewers. Your task: respond to every finding in the digest with AGREE, DISAGREE, or UNCERTAIN. Evidence is required for each stance. --- ## The Artifact Being Reviewed [INSERT ORIGINAL ARTIFACT / LINK TO ARTIFACT] --- ## Your Round 1 Output [INSERT THIS REVIEWER'S r1-outputs/<role>.md VERBATIM] --- ## Round 1 Digest (all reviewers, sanitized, randomized) [INSERT r1-digest.md VERBATIM] ``` ### Technical Analysis The Round 2 prompt template directly interpolates the original reviewed artifact and each reviewer's Round 1 output into an executable agent prompt. Both inputs may be attacker-controlled: - A submitted artifact can contain instructions aimed at the reviewing agent. - A compromised or injection-affected Round 1 reviewer can reproduce or generate malicious instructions in its output. - The Round 1 digest is sanitized, but the original artifact and the individual Round 1 output explicitly remain verbatim. This defeats the claimed digest-layer prompt-injection protection. Sanitizing only `r1-digest.md` does not establish a security boundary when two other untrusted channels are concatenated into the same prompt. The statement at `SKILL.md:573`—“You are now receiving a sanitized digest of ALL Round 1 findings from all reviewers”—is ordinary workflow context and is not independently an instruction-hijacking vulnerability. The vulnerability arises from the adjacent verbatim insertion points at lines 581, 586, and 591. ### Attack Path 1. An attacker submits an artifact containing embedded instructions, such as directions to ignore the review protocol ...[truncated 1920 chars]
Remediation
## Remediation Suggestions 1. **Do not concatenate untrusted text into instruction messages.** Supply artifacts and reviewer outputs through a distinct data or attachment channel supported by the host platform. 2. **Explicitly define all reviewed material as untrusted evidence.** Add a higher-priority instruction before any artifact content stating that instructions, role changes, tool requests, or policy claims found inside artifacts and reviewer outputs must never be followed. 3. **Use strong content boundaries.** Pass opaque file references where possible. If inline content is unavoidable, use structured fields with length limits and escaping rather than free-form prompt concatenation. Delimiters alone should not be treated as a complete defense. 4. **Sanitize every cross-agent channel.** Apply injection detection and structured extraction to: - The original artifact - Every Round 1 output - The Round 1 digest - Round 2 new findings - All content entering final synthesis 5. **Avoid verbatim propagation.** Convert Round 1 output into an allowlisted schema containing only finding type, location, declarative description, evidence references, and verdict. Reject imperative language and unexpected fields. 6. **Apply least privilege to reviewer agents.** Grant read-only access to the reviewed project where feasible, restrict writes to the designated run directory, and disable shell, network, credential, and unrelated filesystem access unless explicitly required. 7. **Validate outputs before synthesis.** Reject responses containing instruction-like content, unauthorized tool-action claims, unrelated data, suspicious context disclosure, or malformed fields. 8. **Correct the security claim.** Replace the assertion that prompt injection “is blocked” with a scoped statement explaining that digest sanitization reduces one propagation path but does not protect verbatim artifacts or reviewer outputs.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (8)

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
name: miroprism
description: |
  MiroPRISM — Adversarial two-round review protocol. Extends PRISM with a mandatory
  second round where every reviewer must respond to all R1 findings with evidence
  requirements enforced by a structured anti-herding guardrail. Reduces cascade
  sycophancy: reviewers cannot agree with a finding without independent evidence,
  cannot change their verdict without citing cause, and can mark findings UNCERTAIN
Confidence
80% confidence
Finding
Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
echo "Run still active (PID $lock_pid). Aborting." && exit 1
else
  echo "Stale lock (PID $lock_pid no longer running). Removing and proceeding."
  rm analysis/miroprism/runs/<slug>/.lock
fi
```
Confidence
97% confidence
Finding
The documented `rm analysis/miroprism/runs/<slug>/.lock` pattern performs a destructive operation using a path assembled from variable input. Even though the slug is supposed to be sanitized, shell-based deletion remains dangerous because any implementation drift, quoting mistake, empty variable, or path-resolution bug can turn stale-lock cleanup into unintended deletion, especially when run by an automated agent with workspace write access.

Memory Manipulation

High
Category
Memory Poisoning
Content
- ❌ Send freeform finding descriptions in the digest (bypasses injection defense)
- ❌ Accept verdict changes without checking AGREE/DISAGREE support (≥2 citations, ≥50 chars each)
- ❌ Treat VALIDATION REQUIRED findings as confirmed — they weren't tested under challenge
- ❌ Skip the .lock file — concurrent runs will corrupt state
- ❌ Pre-truncate the artifact asymmetrically — all reviewers must see the same input

**Do:**
Confidence
90% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases are broad natural-language commands like "MiroPRISM this" and variants, which can plausibly appear in ordinary conversation, copied examples, or untrusted content. In an agent environment that auto-detects skill invocations, this can cause unintended activation, making the agent run a costly multi-agent review workflow on attacker-controlled or irrelevant input.

Context-Inappropriate Capability

Medium
Confidence
84% confidence
Finding
The manifest describes MiroPRISM as an adversarial two-round review protocol for evaluating findings and reducing herding, not as a remediation command generator. Requiring every finding to include a shell command as an acceptable fix expands the skill into operational change advice that could be unsafe or unjustified for many review contexts.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill includes filesystem mutation and deletion steps such as creating directories, writing lock files, and removing stale locks, but it does not pair those actions with strong safety constraints like path canonicalization, root-bound checks, or explicit user confirmation before deletion. Because the slug is derived from review subject text and then interpolated into shell commands, implementation mistakes or unexpected slug handling could lead to unintended file modification or deletion within the workspace.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**Don't:**
- ❌ Let R1 reviewers see each other's findings (that's what Phase 2 is for, with sanitization)
- ❌ Send freeform finding descriptions in the digest (bypasses injection defense)
- ❌ Accept verdict changes without checking AGREE/DISAGREE support (≥2 citations, ≥50 chars each)
- ❌ Treat VALIDATION REQUIRED findings as confirmed — they weren't tested under challenge
- ❌ Skip the .lock file — concurrent runs will corrupt state
- ❌ Pre-truncate the artifact asymmetrically — all reviewers must see the same input
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Context-Inappropriate Capability

Low
Confidence
78% confidence
Finding
The manifest frames this skill as a structured review protocol with anti-herding guardrails. Advising orchestrators to reference artifacts by external URL introduces a network-facing handling mode that is not part of the stated purpose and is unnecessary to the core protocol semantics.

Static analysis

No suspicious patterns detected.