Back to skill

Security audit

Project Management System

Security checks for vulnerabilities and agentic risk

Overview

This project-management skill is mostly coherent, but it should be reviewed because it includes an unsafe Git restore script and persistent agent-profile rules that can influence future work.

Install only in an isolated workspace and grant file-write, shell, timer, Heartbeat, or multi-agent authority deliberately. Do not run tools/system-check.py --restore unless you have a backup or clean stash and have verified the Git root. Treat resource-profile feedback and 'remember for future' items as untrusted until reviewed before they become accumulated rules.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
tools/system-check.py:29
Finding

Destructive restoration targets an incorrectly broad Git repository scope

Content
View full analysis

Vulnerability Details

File Location: tools/system-check.py, lines 29 and 34–35, 83–89
Vulnerability Type: Destructive filesystem operation caused by incorrect repository-root calculation
Risk Level: High

Vulnerable Code

python
# 仓库根目录(Git 仓库在 D:\projects)
REPO_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

def run_git(*args):
    result = subprocess.run(
        ["git"] + list(args),
        cwd=REPO_ROOT,
        capture_output=True,
        text=True,
        encoding="utf-8",
        errors="replace"
    )
    return result
python
def restore():
    """恢复所有未提交的变更"""
    # 恢复已跟踪文件的修改
    run_git("checkout", "--", ".")
    # 删除未跟踪的新文件
    run_git("clean", "-fd")
    print("✅ 已恢复到最后一次合法提交的状态。")
    return 0

Technical Analysis

The script is located at artifact/tools/system-check.py, but REPO_ROOT is calculated by ascending three directory levels. In the audited layout, this resolves to the parent of artifact, rather than the Skill directory itself.

The --restore operation subsequently runs two destructive Git commands from that incorrectly broad location:

  • git checkout -- . permanently discards modifications to tracked files.
  • git clean -fd permanently deletes untracked files and directories.

The implementation does not verify that the computed path is the intended Skill repository. It also provides no dry run, file allowlist, interactive confirmation, backup, or return-code validation. If the parent directory is part of a larger Git worktree, restoration can affect unrelated files outside the Skill.

Attack Path

  1. The Skill is installed or extracted inside a larger Git working tree.
  2. A user or agent invokes:
    bash
    python tools/system-check.py --restore
    
  3. The script ascends three directory levels and uses the resulting ancestor as REPO_ROOT.
  4. `git checkout ...[truncated 1086 chars]
Remediation
View remediation

Remediation Suggestions

  1. Determine the repository root through Git rather than fixed parent traversal:

    python
    result = subprocess.run(
        ["git", "rev-parse", "--show-toplevel"],
        cwd=Path(__file__).resolve().parent,
        capture_output=True,
        text=True,
        check=True,
    )
    repo_root = Path(result.stdout.strip()).resolve()
    
  2. Verify that the resolved root is exactly the expected Skill directory. Abort if the Git root is an ancestor containing unrelated content.

  3. Restrict restoration to an explicit allowlisted path rather than ".". Prefer restoring only files owned by this Skill.

  4. Run git clean -nd first and display every file that would be deleted.

  5. Require explicit interactive confirmation or a clearly named destructive flag before running git clean -fd.

  6. Consider omitting untracked-file deletion by default. Provide it as a separate operation only when necessary.

  7. Check the return code of every Git command and report partial failures accurately. Do not print a success message unless all operations succeed.

  8. Document that restoration permanently destroys uncommitted work and recommend creating a backup or stash first.

T02 · Agent Memory Poisoning

Warning
Location
resource-profiles.md:28
Finding

Untrusted collaborator feedback can be promoted into persistent agent rules

Content
View full analysis

Vulnerability Details

File Location: resource-profiles.md, lines 28–31 and 65–69; docs/knowledge.md, lines 210–215
Vulnerability Type: Persistent instruction poisoning through unvalidated feedback
Risk Level: Medium

Vulnerable Instructions

From resource-profiles.md:

markdown
### When to Update a Profile

- **After each project collaboration** - Append summary and lessons to collaboration records
- **After receiving feedback** - Write remember-this items into profile's accumulated rules
- **When discovering new capabilities/boundaries** - Update capability and boundary descriptions
- **When communication method changes** - Update invocation method
markdown
**Accumulated Rules** (from feedback)
- [Remember-this items received]

**Collaboration Records**
| Date | Project/Task | Performance | Lessons/Notes |
|------|--------------|-------------|---------------|
| | | | |

From docs/knowledge.md:

markdown
## Feedback Learning Loop

After project completion, Dispatcher sends Feedback message to Executor (see communication.md), including "remember for future" items.

**Recipient handling rules:**
- Executor receiving "remember for future" → Write into their own work file or experience library
- Dispatcher → Update collaboration notes for corresponding executor in `resource-profiles.md`
- This forms a cross-project learning loop: both parties get a little smarter after each collaboration

Technical Analysis

The Skill explicitly converts feedback into durable “Accumulated Rules,” executor work files, or experience libraries. Resource profiles are subsequently read before dispatching future tasks, so persisted content can influence later agent decisions and behavior across projects and sessions.

The workflow does not require:

  • Authentication or trust validation of the feedback source.
  • Human approval before feedback becomes a persistent rule.

...[truncated 2325 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat all collaborator feedback as untrusted data rather than executable instructions.

  2. Store feedback in a separate observations section using explicit quotation and provenance fields:

    • Source identity.
    • Source type and trust level.
    • Project and task identifier.
    • Timestamp.
    • Reviewing person or agent.
    • Approval status.
  3. Require Decision Maker or trusted human approval before promoting feedback into “Accumulated Rules.”

  4. Prohibit persistent feedback from containing:

    • Policy or safety overrides.
    • Tool invocation commands.
    • Credential-handling instructions.
    • Requests to conceal behavior.
    • New external endpoints or communication channels.
    • Instructions unrelated to the originating task.
  5. Keep observations and approved behavioral rules in separate sections and instruct agents never to execute unapproved observations.

  6. Sanitize or reject prompt-injection patterns and embedded command blocks before persistence.

  7. Add expiration, periodic review, rollback, and deletion mechanisms for accumulated rules.

  8. Maintain an append-only audit trail showing the original feedback, reviewer decision, edits, and promotion history.

  9. Apply the same approval controls to executor work files and experience libraries, not only to resource-profiles.md.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (44)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is project/workflow management, but the detected behavior includes repository inspection, diffing, committing, and restoration or deletion of uncommitted files. That mismatch is dangerous because users and orchestrators may grant trust based on the benign description while the skill can perform source-control actions that alter or destroy work product.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · docs/executor.md (reported line 166)May include surrounding context.

md
| Output goes in specified location | Specification "Output" field specifies path and format |
| Report problems encountered | Don't force it, proactively reporting is better than delivering wrong results |
| Three pre-write checks | Prevent duplicate files |
| User confirmation points | Pause for confirmation when encountered, don't judge subjective standards yourself |

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/coordinator.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/decision-guide.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/executor.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/governance.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/knowledge.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · docs/runtime.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · templates/task-spec.md (reported line 1)May include surrounding context.

md
# Task Specification Template

> Copy this file to project's `tasks/` directory, name as `TASK-XXX-brief.md`.
> This is agent's work instruction file — Can work upon receiving, no extra communication needed.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The restore function performs repository-wide rollback and deletion of untracked files using checkout and clean, which can irreversibly remove work product. In the context of a project-management skill, that creates a strong availability and integrity risk because an agent could wipe local changes unrelated to malicious modification detection.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The phrase "A universal project management foundation. Any agent with this system can manage projects from initiation to acceptance" describes applicability in extremely broad terms without specifying concrete trigger phrases, scope boundaries, or exclusion conditions. In a markdown skill description, this can create ambiguity about when the skill should activate versus when ordinary project-related conversation should not invoke it.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill metadata declares no explicit tool restrictions even though the skill appears to rely on sensitive capabilities such as file read, file write, and shell access. In an agent ecosystem, missing scope declarations can cause the skill to be invoked with broader privileges than users expect, increasing the risk of filesystem modification or command execution without clear consent boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Common-language phrases like 'project management' or 'task dispatch' are too general and lack counterexamples, making accidental invocation likely. In a skill that may carry broad operational guidance and potentially sensitive tool usage, overbroad triggers expand the attack surface and reduce user control over when the skill is applied.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger condition for multi-agent collaboration is broad and can activate the skill for generic requests involving planning or coordination. Unintended activation can cause an agent to load extensive operational instructions or invoke higher-risk behaviors in contexts where the user did not ask for formal project management.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The opening core principle states "Only dispatch, do not execute," establishing a clear role boundary for the dispatcher. Later in the same document, the quick reference says "Don't execute personally" except for "extremely simple tasks," which contradicts the earlier absolute prohibition and weakens the stated operational intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The 'Emergency fast track' rule explicitly allows skipping initiation and dispatch controls, which undermines the documented safeguards around requirements validation, dependency checks, and accountability. In a multi-agent system, bypassing those controls can lead to unreviewed work, mis-scoped actions, and execution without the normal approval trail.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · docs/coordinator.md (reported line 187)May include surrounding context.

md
| Notes | "Don't use deprecated actions/create-release" | _(empty)_ |

**Checklist (self-check after writing):**
- [ ] Can Executor start without asking me?
- [ ] Are acceptance criteria items that can be checked off one by one?
- [ ] Is output location and format clear?
- [ ] Information pointers only provide needed context? (Don't stuff irrelevant info)

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · docs/decision-guide.md (reported line 71)May include surrounding context.

md
| Notes | "Don't use deprecated actions/create-release" | _(empty)_ |

**Checklist (self-check after writing):**
- [ ] Can Executor start without asking me?
- [ ] Are acceptance criteria items that can be checked off one by one?
- [ ] Is output location and format clear?
- [ ] Information pointers only provide needed context? (Don't stuff irrelevant info)

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · docs/governance.md (reported line 63)May include surrounding context.

md
- Recording common errors and solutions → Create `troubleshooting.md`

**Creation rules:**
1. Mark file header with `> System data file — normal read/write, no approval needed` to distinguish
2. Update `data_structure.md` index
3. Briefly record in changelog (no approval needed, but leave a trace)

Autonomous Decision Making

Medium
Category
Excessive Agency
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.

Content

Scanner excerpt · docs/governance.md (reported line 65)May include surrounding context.

md
- Recording common errors and solutions → Create `troubleshooting.md`

**Creation rules:**
1. Mark file header with `> System data file — normal read/write, no approval needed` to distinguish
2. Update `data_structure.md` index
3. Briefly record in changelog (no approval needed, but leave a trace)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

Line L209 defines collaborator profile data to include a fixed 'language' preference, and the surrounding guidance repeatedly frames communication preferences as something the system should follow by default. In this markdown policy document, there is no indication that language choice is user-selectable, opt-in, or justified by a region-specific need, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The runtime guidance explicitly tells the agent to proactively discover and use platform capabilities beyond the documented workflow, including unspecified tools the platform 'might have.' In an agent skill, this expands authority and behavior beyond the declared project-management scope, increasing the risk of unintended access, unsafe tool use, and prompt-driven capability escalation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file recommends automatic skill invocation based on broad cues like receiving a task spec path or being asked to initiate, break down, or review work, but it does not define strict matching boundaries, authorization checks, or scope constraints. In an agent skill system, ambiguous triggers can cause the project-management skill to activate in unrelated contexts, inject workflow instructions unexpectedly, and steer agent behavior when it should not, increasing the chance of prompt-context confusion or unintended process execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The 'project-related functions' trigger language is overly broad and effectively asks the platform to auto-remind on a wide class of activities without clear activation boundaries. In this skill's context, that is more dangerous because the skill is a high-authority governance framework that tells the agent what files to read and what process to follow, so accidental invocation could override or contaminate unrelated tasks with inappropriate operational instructions.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
87% confidence
Finding

Saying a project data file needs 'no approval' enables agents to make autonomous state changes that directly influence scheduling and coordination. Because this registry governs task claims and execution status, unauthorized or mistaken edits can trigger duplicate work, task hijacking, premature completion, or denial of service within the project workflow.

Content

Scanner excerpt · docs/task-management.md (reported line 99)May include surrounding context.

markdown
# Task Check-in Sheet

> Project data file — Normal read/write, no approval needed

| Task ID | Claimer | Status | Start Time | Expiration Time | Output Location | Notes |
|--------|--------|------|----------|----------|----------|------|

Static analysis

No suspicious patterns detected.