Back to skill

Security audit

Autonomous Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it asks for trust in broad autonomous monitoring while some safety and control claims are under-scoped or nonfunctional.

Review before installing. Use only in a tightly scoped, assisted mode unless you are prepared to restrict filesystem access, disable broad log scanning, and treat the autonomy, rollback, permission, and safety claims as unproven until the implementation is fixed and tested.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/state_awareness.py:81
Finding
Overbroad Host Reconnaissance and Log Collection<![CDATA[ ## Vulnerability Details **File Location**: `scripts/state_awareness.py:81-153` **Vulnerability Type**: Excessive host-level data access and sensitive log collection **Risk Level**: Medium ### Complete Code Snippet ```python def _get_resource_metrics(self) -> Dict[str, float]: """Get current system resource usage metrics.""" try: cpu_percent = psutil.cpu_percent(interval=1) memory = psutil.virtual_memory() disk = psutil.disk_usage('/') return { 'cpu_percent': cpu_percent, 'memory_percent': memory.percent, 'memory_available_gb': memory.available / (1024**3), 'disk_percent': disk.percent, 'disk_free_gb': disk.free / (1024**3), 'process_count': len(psutil.pids()) } except Exception as e: print(f"Error getting resource metrics: {e}") return { 'cpu_percent': 0, 'memory_percent': 0, 'memory_available_gb': 0, 'disk_percent': 0, 'disk_free_gb': 0, 'process_count': 0 } def _get_recent_errors(self, hours: int = 24) -> List[Dict]: """Get recent system errors from logs.""" errors = [] cutoff_time = datetime.now() - timedelta(hours=hours) # Look for error logs in common locations log_locations = [ "os.path.expanduser('~/.claude/logs')", "/var/log", "./logs" ] for log_dir in log_locations: if os.path.exists(log_dir): try: for log_file in os.listdir(log_dir): if log_file.endswith('.log'): file_path = os.path.join(log_dir, log_file) file_errors = self._parse_error_log(file_path, cutoff_time) errors.extend(file_errors) except Exception as e: print(f"Error reading log directory {log_dir}: {e}") return errors def _parse_error_log(self, f ...[truncated 2989 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Default to reading only logs owned by this Skill. 2. Require explicit user approval before scanning `/var/log` or other host-wide locations. 3. Accept an administrator-configured allowlist of canonical log paths. 4. Resolve paths with `realpath()` and reject symlinks or paths outside approved roots. 5. Apply secret and personal-data redaction before storing log content. 6. Store structured error metadata instead of complete raw log lines. 7. Enforce per-file and total byte, line, and time limits. 8. Minimize retention and provide a method to clear captured state. 9. Run the Skill under a dedicated least-privileged account. 10. Document every host metric and log source collected by default. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/resilient_executor.py:186
Finding
Timeout Mechanism Does Not Interrupt or Constrain Task Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/resilient_executor.py:186-278` **Vulnerability Type**: Ineffective timeout enforcement and unsafe retry behavior **Risk Level**: Medium ### Complete Code Snippet ```python def _execute_with_retry_strategy(self, task_func: Callable, context: ExecutionContext, **kwargs) -> ExecutionResult: """Execute task with retry strategy based on error type.""" retry_count = 0 last_error = None last_error_type = None while retry_count <= context.max_retries: try: # Update execution status with self.execution_lock: if context.task_id in self.active_executions: self.active_executions[context.task_id]['status'] = ExecutionStatus.RUNNING # Execute the task start_time = time.time() result = self._execute_task_with_timeout(task_func, context, **kwargs) execution_time = time.time() - start_time # Success - record and return execution_result = ExecutionResult( task_id=context.task_id, status=ExecutionStatus.COMPLETED, result=result, execution_time=execution_time, retry_count=retry_count, metadata={'success': True} ) self._record_success(context, execution_result) return execution_result except Exception as e: execution_time = time.time() - start_time if 'start_time' in locals() else 0 error_type = self._classify_error(e) last_error = str(e) last_error_type = error_type # Check if we should retry if not self._should_retry(error_type, retry_count, context.max_retries): break # Apply recovery actions recovery_actions = self._apply_recovery_actions(error_type, context) # Calculate delay before retr ...[truncated 3190 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Execute untrusted or potentially blocking tasks in a separate subprocess that can be terminated. 2. Use a managed process pool with hard execution deadlines and worker replacement. 3. On timeout, terminate the task, wait for cleanup, and verify that no child processes remain. 4. Do not report timeout protection unless cancellation is demonstrably enforced. 5. Require tasks to declare whether retries are safe. 6. Disable retries by default for write, installation, deletion, modification, and external transaction operations. 7. Use idempotency keys for supported external APIs. 8. Place state-changing tasks inside transactions with verified rollback behavior. 9. Set independent limits for CPU, memory, open files, subprocesses, and network operations. 10. Add tests using non-returning and partially successful callables to verify timeout termination and retry safety. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/autonomous_agent.py:14
Finding
Advertised Autonomous Safety Pipeline Is Nonfunctional Due to API Mismatches<![CDATA[ ## Vulnerability Details **File Location**: `scripts/autonomous_agent.py:14-186` **Vulnerability Type**: Fail-open integration design and unavailable safety controls **Risk Level**: Medium ### Complete Code Snippet ```python # Perception Layer from scripts.event_listener import EventListener from scripts.smart_heartbeat import SmartHeartbeat from scripts.state_awareness import StateAwareness # Judgment Layer from scripts.priority_evaluator import PriorityEvaluator from scripts.risk_decision_matrix import RiskDecisionMatrix from scripts.uncertainty_handler import UncertaintyHandler # Execution Layer from scripts.task_decomposer import TaskDecomposer from scripts.resilient_executor import ResilientExecutor from scripts.error_recovery import ErrorRecovery from scripts.progress_tracking import ProgressTracker # Reflection Layer from scripts.auto_reflection import AutoReflection from scripts.pattern_recognizer import PatternRecognizer from scripts.memory_system import MemorySystem from scripts.self_correction import SelfCorrection ``` ```python def __init__(self, config: Optional[AgentConfig] = None): self.config = config or AgentConfig() # Initialize perception layer self.event_listener = EventListener() self.heartbeat = SmartHeartbeat(interval=self.config.heartbeat_interval) self.state_awareness = StateAwareness() # Initialize judgment layer self.priority_evaluator = PriorityEvaluator() self.risk_matrix = RiskDecisionMatrix( threshold=self.config.risk_threshold ) self.uncertainty_handler = UncertaintyHandler( confidence_threshold=self.config.confidence_threshold ) # Initialize execution layer self.task_decomposer = TaskDecomposer() self.executor = ResilientExecutor(max_retries=self.config.max_retries) self.error_recovery = ErrorRecovery() self.progress_tracker = ProgressTracker() # Initialize reflection layer self.auto_reflection = AutoReflection() self ...[truncated 3762 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace incorrect imports with the actual exported class names or provide explicit compatibility aliases. 2. Align all constructor signatures with the arguments supplied by `AutonomousAgent`. 3. Define stable interfaces for perception, judgment, execution, and reflection components. 4. Update calls to use the existing concrete APIs, such as `make_decision()`, `assess_uncertainty()`, `decompose_task()`, `execute_with_recovery()`, `conduct_reflection()`, and `identify_patterns()`. 5. Validate every component interface during startup. 6. Fail closed and prohibit autonomous execution if any risk or uncertainty component is unavailable. 7. Add an end-to-end test that imports the module, initializes every operating mode, runs a complete cycle, and verifies that risk checks occur before execution. 8. Add static type checking and continuous integration checks for missing symbols and incompatible call signatures. 9. Remove or qualify unsupported safety claims and CLI examples in `SKILL.md` until they are implemented. 10. Provide a tested user override and cancellation mechanism before enabling fully autonomous mode. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding
If the underlying behavior is only rule-based uncertainty assessment and escalation, calling it a broad autonomous framework overstates both capability and safety posture. The main security risk is misplaced trust leading to deployment in contexts where users expect richer oversight, adaptation, or containment than actually exists.

Agent Config Directory Access

High
Category
Agent Snooping
Content
"""Setup default paths to monitor."""
        default_paths = [
            "os.path.expanduser('~/.claude/skills')",
            "os.path.expanduser('~/.claude/config')",
            "os.path.expanduser('~/.claude/memory')"
        ]
Confidence
90% confidence
Finding
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises monitoring, task execution, external API connectivity, and learning behavior, which implies access to filesystem, write, and network capabilities, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, missing scope declarations can cause overbroad access or ambiguous enforcement, making it harder to review and safely contain autonomous behavior.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The description is broad enough to match common requests about autonomous or adaptive AI systems, which can cause the skill to be selected in situations beyond its safe or intended scope. For a skill claiming monitoring, learning, and independent operation, overly broad invocation increases the risk of accidental activation in sensitive contexts.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The markdown promotes autonomous monitoring, learning from user preferences, and external API connections without prominent privacy, consent, retention, and system-impact warnings. In practice, that can normalize surveillance-like behavior and outbound data flows without users understanding what is collected, stored, or transmitted.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The agent starts heartbeat and event monitoring immediately when start() is called, but the file shows no user-facing notice, consent flow, or clear indication that system/activity data will be observed. In an autonomous-agent skill, silent monitoring is more dangerous because the framework is explicitly designed for continuous perception and state awareness, which can collect sensitive operational or user activity data without informed approval.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The user activity monitor collects session timing, interaction counts, and arbitrary interaction details without any built-in notice, consent, minimization, or retention controls. In an autonomous-agent skill context, this creates privacy risk because behavioral telemetry can expose sensitive usage patterns and potentially user-provided content.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The method docstring says it sets up default paths to monitor, and the listed values appear intended to reference ~/.claude directories. However, the entries are quoted string literals containing the text "os.path.expanduser(...)" rather than actual expanded filesystem paths, so os.path.exists(path) will fail and those directories will not be watched.

Missing User Warnings

Medium
Confidence
82% confidence
Finding
The listener automatically sets up monitoring for paths under the user's home directory, including Claude skills, config, and memory locations. Although the code has internal comments and docstrings, it does not provide a user-facing warning that these files and directories may be monitored for changes.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The memory manager accepts and retains arbitrary experience content and metadata, including potentially sensitive user or operational data, without any consent mechanism, data-classification guardrails, or retention warning. In an autonomous-agent context, this is more dangerous because the system is explicitly designed to accumulate reflective and long-term memory, which can silently preserve secrets, personal data, or sensitive workflow details beyond user expectations.

Skill Enumeration

Medium
Category
Agent Snooping
Content
def package_skill():
    """Package the autonomous-agent skill."""

    skill_dir = "os.path.expanduser('~/.claude/skills/autonomous-agent')"
    output_file = "autonomous-agent.skill"

    print("Packaging autonomous-agent skill...")
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.