Back to skill

Security audit

Multi-Agent Collaboration System Skills

Security checks for vulnerabilities and agentic risk

Overview

The skill appears aimed at project collaboration, but it includes unsafe file-overwrite behavior and guidance for unattended automation that users should review before installing.

Install only if you are comfortable with the skill changing project documentation. Prefer scripts/init.sh over scripts/setup.sh, back up existing TASK/CHANGELOG/CONTEXT/docs files first, do not enable cron-based archiving without explicit path limits and review, and run qmd indexing only in projects that do not contain secrets.

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

Warning
Location
scripts/setup.sh:25
Finding

Unconditional Overwrite of Parent-Directory Documentation

Content
View full analysis

Vulnerability Details

File Location: scripts/setup.sh, lines 25-26
Vulnerability Type: Uncontrolled file overwrite and unsafe relative-path handling
Risk Level: Medium

Vulnerable Code

bash
# 3. Create project-specific Best Practices and Model Router docs
cp ./docs/BEST-PRACTICES.md ../docs/BEST-PRACTICES.md
cp ./docs/MODEL-ROUTER.md ../docs/MODEL-ROUTER.md

Technical Analysis

The setup script unconditionally copies two files into the parent directory without checking whether the destination files already exist. This differs from the preceding template-copy loop, which explicitly avoids replacing existing files.

Both source and destination paths are resolved relative to the caller's current working directory rather than the script's own directory. Consequently:

  • Existing documentation in ../docs/ is overwritten without confirmation or backup.
  • Running the script from an unexpected working directory can write into an unintended parent directory.
  • If an attacker can control ./docs/ in the working directory, attacker-controlled content can be copied into the parent project's documentation.
  • A destination symbolic link may cause cp to overwrite the linked file, subject to the invoking user's permissions.

This is an insecure local file operation rather than privilege escalation. The script cannot write beyond the privileges already held by the invoking user.

Attack Path

  1. A victim has existing docs/BEST-PRACTICES.md or docs/MODEL-ROUTER.md files in a parent project directory.
  2. The victim invokes scripts/setup.sh from a directory containing the expected relative docs/ and templates/ paths.
  3. The script executes the unconditional cp commands.
  4. Existing parent-project documentation is replaced without warning or backup.

In a shared or attacker-influenced workspace, an attacker could instead place crafted files under the working directory's ./docs/ path ...[truncated 847 chars]

Remediation
View remediation

Remediation Suggestions

Resolve paths from the script location and require an explicit target directory:

bash
#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
SOURCE_DOCS="$SCRIPT_DIR/../docs"
TARGET_DIR="${1:?Usage: setup.sh TARGET_DIRECTORY}"

mkdir -p -- "$TARGET_DIR/docs"

for file in BEST-PRACTICES.md MODEL-ROUTER.md; do
    source="$SOURCE_DOCS/$file"
    destination="$TARGET_DIR/docs/$file"

    if [[ -e "$destination" || -L "$destination" ]]; then
        printf 'Refusing to overwrite existing destination: %s\n' "$destination" >&2
        continue
    fi

    cp -- "$source" "$destination"
done

Additional hardening measures:

  1. Require explicit user confirmation before replacing existing files.
  2. Create backups when overwrite behavior is intentionally requested.
  3. Reject symbolic-link destinations with [[ -L "$destination" ]].
  4. Validate that the resolved target remains inside the intended project directory.
  5. Use set -euo pipefail so failed copies and unset variables terminate the script safely.
  6. Document the exact destination scope and avoid relying on the caller's current working directory.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description presents a broad multi-agent collaboration methodology for Claude Code, implying coordination logic or workflow behavior among agents. The supplied code does not implement agent collaboration or orchestration; it only initializes a project workspace by creating directories, copying template documents, and substituting a project name into a file. This is a materially different primary purpose from the declared description. While document-driven sync could conceptually relate to the created files, the code chunk itself is just setup/scaffolding and does not realize the claimed methodology.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and the entire document are written in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy because it effectively forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes this skill as a universal multi-agent collaboration methodology with document-driven sync and self-evolution. This file, however, defines the skill's scope to include concrete operational maintenance tasks such as document archiving, moving files, renaming, batch processing, and changelog/task cleanup, which are not clearly implied by collaboration methodology alone.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The Tier 1 trigger keywords are broad everyday terms like cleanup, organize, move, and status-check, making it easy for normal conversation to select a lower-tier model unintentionally. In a routing policy, such accidental downgrades can reduce reasoning quality on tasks that may still affect files or workflows, causing incorrect automation decisions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L032-L035 把“日常对话(默认)”与 分析、解释、建议 等高频词并列为路由依据,但未说明何时应留在默认路由、何时升级或降级,触发边界不清晰。这样的描述容易让大量普通请求被笼统归入该层,缺少明确约束。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

L049-L050 的关键词列表中包含“明确要求”,但未说明要求的具体形式、范围或示例,属于模糊激活条件。该表述无法帮助实现稳定判断,可能导致路由行为不一致。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document promotes cron-driven autonomous archiving that reads and rewrites project files, but it does not pair that guidance with approval gates, dry-run behavior, or rollback requirements. In an agent skill context, scheduled file mutation outside the declared collaboration/sync purpose can normalize unattended repository changes and increase the risk of accidental data loss or integrity issues.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The automation examples describe scheduled archiving and agent turns that operate on CHANGELOG.md without clearly warning that they can modify content automatically. In a skill intended for multi-agent collaboration, omitting write-side effect disclosures can mislead operators into enabling unattended changes they did not fully understand or authorize.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire guide is written in Chinese and the example invocation phrases are all Chinese-only, with no indication that users may choose another language. Under the policy, a skill that imposes a specific language without user opt-in is a natural-language policy violation unless the locale restriction is justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script unconditionally copies BEST-PRACTICES.md and MODEL-ROUTER.md into ../docs, overwriting any existing files without prompting or backup. In an agent workflow, these files may contain project-specific operational guidance, so silent replacement can destroy trusted instructions, alter agent behavior, and create integrity risks for downstream work.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file includes natural-language content stating 'Templates pure English (agent-facing, token-efficient)'. That suggests a language constraint without any indication of user choice or opt-in, which matches the policy category for language or locale restrictions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

文件中的标题、说明、示例与触发词均默认并仅使用中文,且未向用户提供语言/locale 选择,也未说明该路由策略仅适用于中文环境。按规则,这构成潜在的语言/locale 策略问题。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest describes a 'Universal multi-agent collaboration methodology' with 'model-tiered cowork + document-driven sync + self-evolution', but this script only creates local directories and copies template/document files. Its actual operations are a basic local initializer, which does not implement or materially reflect the broader capabilities claimed in the manifest.

Content

No source excerpt is available for this finding.