Back to skill

Security audit

Cognitive Flexibility Release

Security checks for vulnerabilities and agentic risk

Overview

The skill is not destructive or deceptive, but it defaults to storing raw task and context data in plaintext logs and asks for broader tool access than its core reasoning purpose needs.

Review this skill before installing in environments that handle private prompts, customer data, source code, credentials, or business context. Disable monitoring where possible, avoid passing sensitive context, delete or restrict the logs directory, and consider removing unused tool permissions such as Write, Edit, sessions_send, and web_search unless the publisher documents a clear need.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/usage_monitor.py:58
Finding

Default Monitoring Persists Complete Task and Context Data in Plaintext

Content
View full analysis
= 0.7, "needs_improvement": result.get("assessment", {}).get("needs_improvement", False), "mode_switched": result.get("mode_switched", False), "previous_mode": result.get("previous_mode", None), "context": context or {} } # Write to log file with open(self.log_file, 'a', encoding='utf-8') as f: f.write(json.dumps(log_entry, ensure_ascii=False) + '\n') ``` ### Technical Analysis `CognitiveController` enables monitoring by default and sends the complete task and context to `UsageMonitor.log_usage()`. The monitor serializes both values directly into `logs/usage-log.jsonl`. No data minimization, secret filtering, explicit user consent, retention policy, encryption, or restrictive file-permission handling is applied. The `task_hash` field does not protect th ...[truncated 1266 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
scripts/pattern_matcher.py:61
Finding

Untrusted Memory Content Can Be Propagated Verbatim into the Final Answer

Content
View full analysis
List[Dict]: """Retrieve similar tasks""" similar_tasks = [] # Search through memory_search if tools and hasattr(tools, 'memory_search'): memories = await tools.memory_search(query=task, maxResults=10) similar_tasks = memories.get('results', []) # Filter highly similar tasks filtered = [] for task_item in similar_tasks: similarity = self._calculate_similarity(task, task_item) if similarity >= self.similarity_threshold: task_item['similarity'] = similarity filtered.append(task_item) # Sort by similarity filtered.sort(key=lambda x: x.get('similarity', 0), reverse=True) return filtered[:5] ``` ```python # scripts/pattern_matcher.py:84-99 def _extract_patterns(self, similar_tasks: List[Dict]) -> List[Dict]: """Extract patterns from similar tasks""" patterns = [] for task in similar_tasks: # Extract task pattern pattern = { "task_type": task.get("task_type", "unknown"), "solution_approach": task.get("solution_approach", ""), "success_factors": task.get("success_factors", []), "pitfalls": task.get("pitfalls", []), "similarity": task.get("similarity", 0) } patterns.append(pattern) return patterns ``` ```python # scripts/pattern_matcher.py:153-164 def apply_pattern(self, pattern: Dict, current_task: str) -> Dict: """Apply a pattern to the current task""" return { "original_task": current_task, "applied_pattern": pattern, "adapted_solution": self ...[truncated 3157 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Note
Location
SKILL.md:20
Finding

Declared Agent Tool Permissions Exceed Implemented Functional Requirements

Content
View full analysis
Remediation
View remediation
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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (44)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The file advertises complete usage logs, statistics, monitoring, and reporting, but it does not warn about what task details may be persisted, for how long, or whether sensitive prompts/context are included. Undisclosed persistent logging can expose confidential user data on disk and create secondary leakage through reports or retained analytics.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document explicitly describes ongoing usage monitoring and daily feedback collection channels, but it provides no notice about what data is collected, how long it is retained, who can access it, or whether users can opt out. In a skill intended for broad community release, this creates a real privacy and compliance risk because telemetry and feedback artifacts may include user prompts, model outputs, identifiers, or operational metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The token-based login instructions tell the user to create, copy, and place a CLI token into a command or environment variable, but they do not warn that the token is a secret or that it can be exposed through shell history, screenshots, terminal recording, shared transcripts, or persisted environment state. If mishandled, the token could allow unauthorized publication or account actions in ClawHub under the user's identity.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide introduces persistent monitoring, usage tracking, and effectiveness evaluation features that go beyond the stated purpose of a cognitive reasoning/flexibility skill. Even without executable code shown here, documenting collection of task, mode, result, context, timestamps, and reports expands the skill into telemetry and data collection, increasing privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The monitoring guide describes logging and storage behavior but omits any warning that user task data may be collected and persisted. This lack of transparency increases the chance that operators unknowingly store sensitive information, creating privacy, compliance, and insider-access risks.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Detailed usage logging and report/export capability is not necessary for core cognitive-flexibility behavior and creates a side-channel for collecting operational and potentially sensitive task data. Because the documented API logs task and context, this can capture user prompts, business data, or internal workflows without clear limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Task-level log export materially increases risk because it creates an easy data extraction path for timestamps, modes, and task contents into a portable JSON file. Exported files are easier to copy, mishandle, or ingest elsewhere, which magnifies exposure of sensitive prompts and contextual information beyond the original runtime environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The export example explicitly shows iterating over logs containing timestamps, mode, and task fields, yet provides no caution about sensitive data in the resulting JSON file. This is dangerous because exported artifacts commonly escape normal access controls and can be shared, backed up, or exposed accidentally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

该发布指南全文以中文编写,未说明这是面向特定中文受众的区域化文档,也未提供其他语言选项或用户选择机制。根据规则,强制特定语言而无用户选择或明确合理化说明,属于自然语言层面的语言/区域策略违规。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description is written as a directive in Chinese and the README provides no indication that other languages are supported or that the language choice is optional. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation guidance is broad enough to encourage use on many normal tasks, which increases unnecessary exposure to powerful tools like memory_search, sessions_send, web_search, Write, and Edit. Overbroad invocation criteria can lead operators or automated planners to select this skill in contexts where its data access and modification capabilities are not needed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly advertises usage tracking, monitoring, stats, and report generation, yet gives no warning about potential data collection, retention, or sensitivity of logged task context. In a reasoning skill likely to process proprietary or personal inputs, silent telemetry materially raises privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This manifest mixes English metadata with Chinese-only descriptive fields and labels, including the top-level heading and description text. For a general-purpose skill with no documented regional or locale constraint, forcing a specific language in user-facing natural language can violate language/locale policy when no user opt-in or choice is offered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file explicitly describes automatic collection of usage metrics and provides commands to export logs, but it does not mention consent, minimization, retention, access controls, or any user-facing privacy notice. In a skill context, usage logs can contain prompts, identifiers, or behavioral metadata, so undocumented telemetry can create privacy and compliance risk even if the feature is intended for benign analytics.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes a skill for cognitive flexibility, mode switching, metacognitive monitoring, and complex reasoning support. This file instead implements persistent user-feedback collection, logging, statistics generation, and export functionality, which is an operational telemetry/maintenance capability rather than a direct requirement of the stated reasoning purpose.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module documentation says it 'automatically collects user feedback' and 'collects from various channels' for the skill. In practice, the implementation only provides add_feedback(feedback) to append caller-supplied dictionaries to local files; there is no code for channel integration, polling, or automatic collection from GitHub, Discord, email, or other sources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code writes full feedback objects, including user identifiers and free-form descriptions, directly to a local JSONL log without minimization, consent handling, retention controls, or access restrictions. In this skill context, the feedback system is ancillary to the core purpose, so collecting and persisting potentially sensitive user content expands privacy exposure without clear necessity.

Content

No source excerpt is available for this finding.