Back to skill

Security audit

devils-advocate

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent decision-review workflow, but it can gather persistent context and share it across many agents or another model provider from broad natural-language triggers.

Install only if you are comfortable with a decision workflow that may read relevant agent memory/context, perform web or browser lookups, spawn many advisors, and possibly use another model provider. Prefer invoking it explicitly with /devil, and review or limit what context is available before using it on private, legal, financial, or business-sensitive decisions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:30
Finding

Overbroad Access to Agent Memory and Context

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 30
Vulnerability Type: Overbroad access to persistent Agent context
Risk Level: Medium

Complete Snippet:

markdown
Before spawning anyone, gather real data: scan relevant context you already have access to (memory/context files, anything the user referenced or attached).

Technical Analysis

The Skill instructs the Agent to scan any accessible memory or context files without restricting collection to the current conversation, files explicitly selected by the user, or data strictly necessary for the decision being analyzed. This conflicts with least-privilege and data-minimization principles because persistent Agent memory may contain unrelated private information from earlier interactions.

The collected information is placed into a shared context block and reused in later processing stages. As documented elsewhere in the Skill, this block may be sent to multiple sub-agents and to an alternate model provider. Consequently, an overly broad initial read can amplify disclosure across several processing boundaries.

The issue does not grant new operating-system permissions or bypass a technical access-control mechanism. Instead, it directs the Agent to exercise already available access more broadly than the immediate task may require.

Attack Path

  1. A user or attacker invokes the Skill with /devil or a matching natural-language trigger.
  2. The Skill directs the Agent to scan accessible memory and context files.
  3. The Agent retrieves information unrelated to the current decision, potentially including private data from prior conversations.
  4. That information is incorporated into the canonical context block.
  5. The context block is copied into prompts for multiple advisors and reviewers.
  6. If alternate-model routing is available, some of the information may also cross a model-provider boundary without item-specific user consent.

Im

...[truncated 707 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict default collection to the current conversation and attachments explicitly selected for the current decision.
  2. Require informed, explicit consent before reading persistent memory, prior-session records, unrelated context files, or external note stores.
  3. Enumerate the proposed sources before accessing them and allow the user to approve or reject each source.
  4. Apply purpose limitation: retrieve only information directly necessary to answer the framed question.
  5. Minimize and redact secrets, credentials, personal data, and unrelated confidential information before constructing the shared context block.
  6. Require separate consent before sending any context to a different model or provider, and clearly identify the applicable boundary.
  7. Prefer derived, narrowly scoped facts over verbatim source content unless exact reproduction is essential.
  8. Add a guardrail such as:
markdown
Use only the current conversation and attachments the user explicitly selected.
Do not inspect persistent memory, prior conversations, or unrelated context files
without first listing the specific sources and obtaining explicit user consent.
Before sending context to sub-agents or another provider, remove information not
necessary for the decision and redact sensitive data.
  1. Record which approved sources contributed to the context block so the user can review the provenance and disclosure scope.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (4)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 49)May include surrounding context.

md
## Install

Drop [`SKILL.md`](SKILL.md) into your agent framework's skills directory (e.g. `.claude/skills/devils-advocate/SKILL.md`, or your OpenClaw `skills/` folder) and restart/reload skills. Trigger with `/devil`, or natural language: *"pressure-test this," "council this," "what would you do."*

## Origin

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 49)May include surrounding context.

md
## Install

Drop [`SKILL.md`](SKILL.md) into your agent framework's skills directory (e.g. `.claude/skills/devils-advocate/SKILL.md`, or your OpenClaw `skills/` folder) and restart/reload skills. Trigger with `/devil`, or natural language: *"pressure-test this," "council this," "what would you do."*

## Origin

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language trigger examples are broad enough to overlap with ordinary conversation, especially phrases like "what would you do." In agent frameworks that auto-match skills from user text, this can cause unintentional invocation of the skill, leading to unexpected web access, sub-agent spawning, or decision-synthesis on inputs the user did not intend to route through this workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list includes very broad natural-language activations such as "what would you do," which can match ordinary conversation rather than an intentional request to run this high-cost, multi-agent workflow. That creates a prompt-squatting/accidental-activation risk: unrelated user queries may invoke external lookup, browser use, multiple sub-agents, and scheduling behavior without clear user intent.

Content

No source excerpt is available for this finding.