Back to skill

Security audit

Subagent Health Monitor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local Claude Code MCP monitor with some implementation and disclosure weaknesses, but no evidence of hidden exfiltration, privilege escalation, or destructive behavior.

Install only if you are comfortable with a local MCP server storing subagent names and task descriptions on disk under ~/.claude. Avoid putting secrets or sensitive customer data in task descriptions, and treat duplicate-detection and token-waste numbers as incomplete heuristics rather than audited measurements.

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/subagent-health.py:21
Finding

Unbounded MCP Input Persisted to Local State

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description understates or misstates actual behavior by omitting persistent local state access and overstating exposed duplicate-detection functionality. Security-relevant behavior mismatches are dangerous because users and reviewers make trust decisions based on the declared purpose; hidden persistence in ~/.claude can enable silent data retention, unexpected state manipulation, or operational confusion.

Content

No source excerpt is available for this finding.

MCP Config Access

High
Category
Agent Snooping
Confidence
95% confidence
Finding

Skill accesses MCP server configuration files (mcp.json). MCP configs contain server URLs, authentication tokens, and tool definitions — reading them allows the skill to discover and potentially abuse other tool integrations.

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

Quick start

Add to ~/.claude/mcp.json:

json
{

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill exposes code-backed behavior with file-write capability but does not declare any tool scope, permissions, or allowed-tools constraints. This creates a transparency and least-privilege failure: users may install or invoke the skill without realizing it persists data locally, increasing the chance of unintended filesystem modification and making abuse harder to detect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The description promises real-time tracking with actionable alerts, but get_fleet_summary fabricates estimated_waste_tokens as a fixed 18% of total tokens and waste_percentage as a constant 18, without tying them to observed idle loops or measured events. This creates a mismatch between claimed monitoring semantics and the actual heuristic-only implementation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says the skill detects duplicate task spawns, but spawn_with_tracking only hashes the task description and stores metadata in self.tasks without incrementing counts, checking for prior duplicates, or surfacing any duplicate-related alert. As implemented, duplicate tracking behavior is not present even though it is advertised as a core capability.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code persistently writes agent and task state to ~/.claude/subagent-health-state.json, which affects user data on disk. While the module docstring names the tool, there is no confirmation prompt, comment, or user-facing notice near the write path explaining that invocation will create and update a local state file.

Content

No source excerpt is available for this finding.