Back to skill

Security audit

agent-teams

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but it needs review because it coordinates multiple Claude agents through writable local files and can spawn, stop, and authorize agents with broad project powers without strong trust controls.

Install only if you intentionally want local multi-agent orchestration and are comfortable with persistent ~/.claude coordination files, tmux-managed Claude processes, and agents that may have write/build/Git powers. Use isolated worktrees or tightly scoped roles, restrict permissions on coordination directories, and avoid relying on unauthenticated inbox messages for approvals, shutdowns, or role changes unless the consuming tooling adds those controls.

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
modules/messaging-protocol.md:21
Finding
Unauthenticated Coordination Messages and Mutable Authorization State<![CDATA[ ## Vulnerability Details **File Location**: `modules/messaging-protocol.md:14-29, 62-126, 130-151`; `modules/crew-roles.md:23-37, 70-81`; `modules/team-management.md:64-73` **Vulnerability Type**: Unauthenticated inter-agent communication and insufficient authorization controls **Risk Level**: High ### Vulnerable Code Segments The inbox is a directly writable JSON file: ```text ~/.claude/teams/<team>/inboxes/<agent-name>.json ``` Messages contain a caller-controlled sender identity without an authentication field: ```json { "from": "team-lead", "text": "Implement the auth middleware next", "timestamp": "2026-02-07T22:00:00Z", "read": false, "summary": "Auth middleware task", "color": "#FF6B6B" } ``` The protocol permits security-sensitive messages such as plan approvals: ```json { "from": "team-lead", "type": "plan_approval", "text": "{\"task_id\": \"3\", \"approved\": true, \"notes\": \"Proceed with approach A\"}", "timestamp": "2026-02-07T22:20:00Z", "summary": "plan approved: T3" } ``` Inbox writes are protected against concurrent corruption, but not against unauthorized writers or sender impersonation: ```python import fcntl lock_path = inbox_dir / ".lock" lock_path.touch() with open(lock_path) as lock_fd: fcntl.flock(lock_fd, fcntl.LOCK_EX) # Acquire exclusive lock try: # Read, modify, write inbox JSON messages = json.loads(inbox_path.read_text()) messages.append(new_message) inbox_path.write_text(json.dumps(messages)) finally: fcntl.flock(lock_fd, fcntl.LOCK_UN) # Release lock ``` Missing role information defaults to a role with full tool access: ```markdown **Default role**: `implementer` (backward compatible — members without an explicit role are treated as implementers). ``` ```markdown | Capability | implementer | researcher | tester | reviewer | architect | |-----------|:-----------:|:----------:|:------:|:--------:|:---------:| | Read files | Yes | Y ...[truncated 4984 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Authenticate every message** - Assign each team session or member a cryptographically random key. - Add a message identifier, sender identity, recipient identity, timestamp, nonce, and HMAC or digital signature. - Verify authentication before parsing or acting on message contents. - Derive sender identity from an authenticated channel where possible rather than trusting the JSON `from` field. 2. **Enforce message-level authorization** - Permit only the authenticated lead to send plan approvals, shutdown requests, role changes, task reassignments, and health-control messages. - Define an explicit authorization matrix for every message type. - Reject unknown types, unexpected fields, invalid state transitions, and unauthorized senders. 3. **Apply restrictive filesystem controls** - Create team and task directories with mode `0700`. - Create inbox, task, lock, and configuration files with mode `0600`. - Verify file ownership before every read or write. - Refuse symlinks and use descriptor-relative operations with `O_NOFOLLOW` where supported. - Validate canonical paths remain beneath the expected team directory. 4. **Separate authorization state from teammate-writable data** - Do not allow ordinary teammate processes to modify `config.json`. - Route role changes through an authenticated lead-only API. - Maintain immutable audit records for role changes and privileged messages. - Revalidate active tasks immediately after every authorized role change. 5. **Fail closed for missing or invalid roles** - Replace the full-tool `implementer` default with a least-privileged role. - Reject missing, unknown, or malformed role values. - Require explicit authorization before granting file-writing, Git, build, or command-execution capabilities. 6. **Harden inbox processing** - Enforce strict JSON schemas and message-size limits. - Track unique message IDs and reject duplica ...[truncated 415 chars]
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (5)

Session Persistence

Medium
Category
Rogue Agent
Content
**Design principles:**
- **Filesystem is the database**: JSON files, atomic writes via `tempfile` + `os.replace`
- **fcntl locking**: Prevents concurrent read/write corruption on inboxes and tasks
- **Numbered tasks**: Auto-incrementing IDs with sequential file naming
- **Loose coupling**: Agents poll their own inbox; no push notifications
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill prescribes destructive recovery actions such as releasing claimed tasks, killing tmux panes, respawning agents, and replacing agents without any explicit user warning, approval gate, or safety constraints. In an agent-orchestration context, these actions can disrupt active work, terminate legitimate long-running processes, or discard ownership/state based on imperfect heartbeat heuristics, making accidental denial of service or data/work loss plausible.

Session Persistence

Medium
Category
Rogue Agent
Content
## CRUD Operations

### Create
```python
task = create_task(team, subject, description, owner=None, blocks=[], metadata={})
# Auto-increments ID, writes <id>.json, returns created task
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The markdown documents that team deletion 'purges both `teams/` and `tasks/` directories`, which is a destructive operation affecting user data. The file does not include any warning, confirmation requirement, or cautionary note about the irreversible impact of this action.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The documentation explicitly instructs users to terminate a tmux pane with `tmux kill-pane -t <pane_id>` but does not warn that this immediately kills the process running in that pane and can interrupt in-flight agent work or lose unsaved state. In this skill’s context, pane termination is part of orchestration, so the risk is operational rather than exploit-driven, but omission of a warning can still lead to accidental destructive use.

Static analysis

No suspicious patterns detected.