Back to skill

Security audit

Agent Self-Care

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed self-maintenance tool, but it can automatically kill agent sessions and processes on broad criteria and write persistent memory without enough user control.

Review before installing. Use this only in a tightly scoped environment where losing background work is acceptable, or modify it to run in dry-run mode by default, require explicit confirmation before killing anything, restrict cleanup to tagged resources, and disable persistent memory writes unless opted in.

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

Warning
Location
SKILL.md:13
Finding

Unbounded Autonomous Termination of Sub-Agents and Processes

Content
View full analysis
30 min without progress - In "waiting" state - Failed/errored ### 2. Check Processes ```bash process action=list ``` Kill hanging processes: - Running >10 min in background - No output in 5 min ``` The behavior is intended to run repeatedly: ```markdown ## Cron Schedule Recommended: Every 5 minutes for active agents. ```json { "name": "agent-self-care", "schedule": {"kind": "every", "everyMs": 300000}, "payload": {"kind": "agentTurn", "message": "Run agent-self-care skill"}, "sessionTarget": "isolated", "enabled": true } ``` ``` The following principles encourage termination without user involvement: ```markdown ## Key Principles 1. **Always clean** - Never leave stalled sub-agents or processes 2. **Proactive** - Don't wait for user to ask 3. **Document** - Log issues and improvements 4. **BMAD** - Continuous self-evaluation every 10 runs 5. **Fast** - Complete in <30 seconds ``` ### Technical Analysis The Skill instructs an agent to identify and terminate sub-agents and processes using broad conditions such as elapsed runtime, a waiting state, or lack of recent output. These conditions are insufficient to establish that a resource is stalled: - A waiting sub-agent may be awaiting a legitimate dependency or user response. - A background process may run for more than ten minutes as part of its normal operation. - A process may produce no output while performing valid CPU-bound work, sleeping, polling, or waiting for I/O. - A failed sub-agent may contain state or diagnostic information that should be preserved rather than immediately destroyed. No ownership checks, resource tags, allowlists, dependency ch ...[truncated 2396 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (3)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description uses broad trigger phrases like "optimize," "cleanup," "health check," and "self-maintain," which are common in normal user requests and can cause the skill to activate in contexts the user did not intend. Because this skill performs destructive maintenance actions, overbroad activation materially increases the chance of unwanted process termination, session interference, or persistent changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions explicitly direct killing sub-agents and processes based on coarse heuristics like elapsed time, waiting state, or lack of recent output, without requiring verification that work is actually stalled or warning about loss of state. In the context of an autonomous cron-triggered skill running every five minutes, this creates a serious risk of terminating legitimate long-running tasks and causing denial of service or data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to write retrospective notes into persistent memory files without disclosure or consent, creating silent long-term state that may include sensitive operational details, user content, or flawed self-modifying guidance. In a self-maintenance skill, persistent writes are especially risky because they can accumulate automatically across repeated scheduled runs and influence future behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.