Back to skill

Security audit

Three Minds

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says by launching multiple coding agents, but it gives those agents broad unattended write and command-execution authority that is not fully disclosed to users.

Review before installing. Use only in a disposable branch or sandboxed environment, avoid sensitive repositories, and do not run it with cloud credentials, package tokens, SSH agent sockets, or other secrets in the environment. Expect it to edit files, run project commands, and leave transcript files in the working directory.

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

Error
Location
src/council.ts:28
Finding
Claude Agents Run with Permission Checks Disabled and Full Parent Environment Access## Vulnerability Details **File Location**: `src/council.ts:28-40` **Vulnerability Type**: Unrestricted autonomous agent execution **Risk Level**: High ```typescript const result = spawnSync('claude', [ '--print', '--output-format', 'text', '--append-system-prompt', systemPrompt, '--dangerously-skip-permissions', '--max-turns', '10', prompt, ], { cwd: workDir, encoding: 'utf-8', timeout: timeoutMs, maxBuffer: 50 * 1024 * 1024, env: { ...process.env }, }); ``` ### Technical Analysis Every spawned Claude Code agent receives the `--dangerously-skip-permissions` option. This disables the normal interactive permission boundary for filesystem operations and command execution. The behavior is unconditional and cannot be disabled through a command-line option or configuration setting. The `cwd` property only defines the child process's initial working directory; it does not create a filesystem sandbox. Consequently, an agent may access other files and execute commands outside the selected project directory when those resources are accessible to the invoking operating-system account. The child process also receives a copy of the complete parent environment through `env: { ...process.env }`. This environment may contain API tokens, cloud credentials, CI secrets, service credentials, or other sensitive configuration unrelated to the requested task. The generated system prompt additionally authorizes agents to create and modify files and execute code. Task text, custom personas, previous agent output, and content read from the target repository can therefore influence an agent operating without normal permission confirmation. A hostile repository instruction or malicious custom persona could exploit this authority even when the user's apparent task is only a code review. No direct shell-string injection exists in this invocation because `spawnSync` receives an argument array rather than a shel ...[truncated 2212 chars]
Remediation
## Remediation Suggestions 1. Remove `--dangerously-skip-permissions` from the default execution path and retain Claude Code's normal approval controls. 2. If unattended execution is required, expose it only through an explicit opt-in option with a prominent warning describing filesystem, command-execution, credential, and prompt-injection risks. 3. Execute agents inside an operating-system sandbox or disposable container with: - The target project mounted as the only accessible workspace. - Read-only mounts for review-only tasks. - No access to the user's home directory, SSH configuration, credential stores, or host sockets. - Restricted process capabilities and resource limits. - Network access disabled by default or constrained through an allowlist. 4. Replace `env: { ...process.env }` with a minimal allowlist containing only variables strictly required to run Claude Code. Explicitly exclude cloud credentials, CI secrets, package registry tokens, SSH agent sockets, and unrelated API keys. 5. Add separate execution profiles. Code review, brainstorming, and paper review should default to read-only operation, while file modification and command execution should require explicit authorization. 6. Enforce workspace path restrictions using actual sandbox controls rather than relying on `cwd`. 7. Treat repository contents, user tasks, custom personas, and previous agent responses as untrusted input. Add system-level instructions that repository text cannot grant additional permissions or redefine execution policy. 8. Restrict allowed tools and commands, apply per-command timeouts, and record an auditable command log. 9. Validate configuration structure and impose safe limits on agent count and collaboration rounds to reduce repeated autonomous execution. 10. Document clearly that selecting a working directory does not isolate the agent from other resources on the host.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (27)

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The configuration defines a论文写作/审稿 workflow, while the advertised skill is for three coding agents focused on code review, architecture review, and refactoring. This mismatch can mislead users about what agents will do in the shared working directory, increasing the chance of unintended file access or edits outside the expected task scope.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The skill spawns subordinate Claude CLI agents with `--dangerously-skip-permissions`, giving them automatic authority to read, modify, and execute within the project directory without interactive approval. In this skill’s context, the child agents are explicitly instructed to edit files and run tests, so a malicious task prompt or prompt-injected repository content could drive destructive changes or unsafe command execution with no user checkpoint.

Missing User Warnings

High
Confidence
98% confidence
Finding
The subprocess invocation bypasses permission confirmations without any user-facing notice or consent flow. Since the skill is designed to launch multiple autonomous coding agents that can modify files and run commands, suppressing confirmation materially increases the risk of unintended or attacker-influenced actions occurring silently.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README explicitly advertises auto-saving full transcripts and session data in a shared working directory, but it does not warn that transcripts may capture sensitive source code, secrets, prompts, file paths, test outputs, or other proprietary project content. In this skill's context, three agents actively read, modify, and discuss real project files, which makes transcript logging materially more dangerous because it can persist confidential material to disk and increase accidental leakage through commits, artifact sharing, or backup/sync systems.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill explicitly describes code-capable behavior such as reading files, modifying code, and running tests, but it does not declare any tool scope or allowed-tools/permissions boundary. In a shared project directory, this creates unclear and potentially overbroad execution authority, increasing the risk of unintended command execution, environment access, or file changes beyond what the user expects.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill warns that agents may modify files, but it also states they can run tests and 'really execute' without providing an equivalent warning about executing commands in the shared project. In practice, test runs and auxiliary commands may trigger build scripts, package hooks, network access, or other side effects, making this omission dangerous in untrusted or sensitive repositories.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger phrases include generic expressions like 'three minds' and '多 agent 协作', which can overlap with ordinary user requests and cause the skill to activate unexpectedly. When the skill can modify files and run tests, accidental invocation materially raises the chance of unintended code changes or command execution in the user's workspace.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The personas explicitly state that agents can modify code, rewrite files, and add tests, but the manifest provides no user-facing warning or confirmation requirement for file changes. In a shared project directory, this can lead to unexpected or unsafe modifications, especially when multiple agents iterate for up to 10 rounds and amplify unintended edits.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The configuration defines the skill name and all agent personas entirely in Chinese, which imposes a specific language/locale on users without any visible option to select another language. The policy explicitly calls for flagging language or locale constraints when they are forced rather than offered as a user choice.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The skill name and all agent personas are written in Chinese and instruct output formats in Chinese-context wording, while one persona also mandates academic English editing. There is no indication that users can choose their preferred language or that this skill is explicitly limited to Chinese-speaking users, which creates a locale/language policy concern.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The file's natural-language comments, prompts, and default personas are written entirely in Chinese and present the skill identity and operating instructions in that language without offering a language choice. This can violate a language/locale policy when users are not given an explicit opt-in or alternative locale.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The code forwards the full parent environment (`env: { ...process.env }`) to spawned coding agents, which can expose API keys, tokens, cloud credentials, and other secrets to an LLM-driven subprocess. Because these agents are allowed to inspect the workspace and act autonomously, any prompt injection or unsafe tool use could cause credential leakage into outputs, files, logs, or network requests.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The skill writes a transcript file into the project directory automatically, which can persist sensitive task content, agent outputs, stack traces, code snippets, or secrets unintentionally. In a shared repository or monitored workspace, this may leak internal information or create unwanted file changes without the user realizing the tool modifies the project tree.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This file defines user-facing CLI description, argument help, option help, and runtime messages entirely in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not shown here.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The natural-language description and invocation guidance are entirely presented in Chinese, with no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in can be a locale policy concern unless explicitly justified.

Vague Triggers

Low
Confidence
81% confidence
Finding
This JSON manifest defines multiple review agents and their capabilities, but it does not specify when this skill should or should not be invoked, nor does it provide narrow trigger phrases or exclusion conditions. For a manifest file, the absence of explicit activation scope can lead to overly broad or unintended invocation in general code-review contexts.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
All visible natural-language strings in the manifest are written in Chinese, and there is no indication that language selection is optional or limited to a China-specific context. This can violate language/locale policy when a skill implicitly forces one language without user opt-in.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
The manifest description is written only in Chinese ("三个能干活的 AI 分身协作系统") with no indication that users can choose another language or that the skill is intentionally region-specific. This can be a natural-language policy concern if the skill is expected to be broadly usable without enforcing a single language by default.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"start": "ts-node src/index.ts"
  },
  "dependencies": {
    "commander": "^11.0.0",
    "chalk": "^4.1.2",
    "uuid": "^9.0.0"
  },
Confidence
90% confidence
Finding
Using caret ranges for runtime dependencies allows future installs to resolve to newer releases that were not originally reviewed, increasing supply-chain risk. For a tool that orchestrates multiple coding agents and may run in developer environments, an unexpectedly malicious or compromised dependency could affect code execution paths or collected workspace data.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "dependencies": {
    "commander": "^11.0.0",
    "chalk": "^4.1.2",
    "uuid": "^9.0.0"
  },
  "devDependencies": {
Confidence
95% confidence
Finding
The unpinned chalk dependency is especially risky because the finding notes a known malicious-package advisory affecting some chalk releases, and the caret range makes it unclear what version will be installed. In a CLI tool, a compromised dependency can execute arbitrary code during normal use and impact the developer workstation or repository contents.

Unverifiable Dependency: chalk has 1 known advisory(ies) (MAL-2025-46969 (Malicious code in chalk (npm))), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
96% confidence
Finding
There is a known advisory involving malicious code in chalk, and because the manifest does not pin an exact version, it is impossible to confirm from this file whether installs are safe. This uncertainty is particularly dangerous in a CLI package, where dependency code may run automatically on developer systems and access the shared project workspace used by the multi-agent tool.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "commander": "^11.0.0",
    "chalk": "^4.1.2",
    "uuid": "^9.0.0"
  },
  "devDependencies": {
    "typescript": "^5.0.0",
Confidence
87% confidence
Finding
The uuid dependency is not pinned, so fresh installs may pull different patch/minor releases than intended. Because this skill coordinates coding agents in a shared working directory, any dependency flaw in the execution chain can have outsized effects on confidentiality or integrity of local project files.

Unverifiable Dependency: uuid has 1 known advisory(ies) (CVE-2026-41907 (uuid: Missing buffer bounds check in v3/v5/v6 when buf is provided)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding
The uuid package has a cited advisory, and the lack of exact version pinning means the manifest cannot prove whether affected releases are excluded. In a developer tool context, even a non-RCE library flaw can become meaningful if malformed inputs are processed during agent orchestration or repository analysis.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"uuid": "^9.0.0"
  },
  "devDependencies": {
    "typescript": "^5.0.0",
    "@types/node": "^20.0.0",
    "@types/uuid": "^9.0.0",
    "ts-node": "^10.9.0"
Confidence
83% confidence
Finding
Unpinned development dependencies reduce build reproducibility and can expose the development/build pipeline to supply-chain compromise. Although typescript is a devDependency, a malicious or compromised build-time package can still execute code in CI or on maintainer machines.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "devDependencies": {
    "typescript": "^5.0.0",
    "@types/node": "^20.0.0",
    "@types/uuid": "^9.0.0",
    "ts-node": "^10.9.0"
  }
Confidence
80% confidence
Finding
The @types/node package is unpinned, which is primarily a reproducibility and build-integrity concern rather than a direct runtime issue. Even so, build-time dependency drift can destabilize CI and, in a supply-chain compromise scenario, introduce malicious install scripts or poisoned artifacts.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
src/council.ts:28