Back to skill

Security audit

.Backup Global Cognitive Brain 20260316 100703

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to remember conversations, but it stores raw prompts broadly, reuses them in future context, and writes memory files outside its own package folder.

Review this carefully before installing. It is not showing malware behavior, but it is designed to remember and reuse conversation content automatically. Do not use it with secrets, credentials, personal data, or confidential work unless persistence is made opt-in, scoped per user/workspace, redacted, deletable, and moved into an approved storage location inside or explicitly configured by the host.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
global_cognitive_brain.py:59
Finding

Unredacted Persistent Storage of Conversation Content

Content
View full analysis
20: working_memory['recent_dialogues'] = working_memory['recent_dialogues'][-20:] save_json(WORKING_FILE, working_memory) ``` ```python def layer2_working_memory(user_input: str, layer1_result: Dict) -> Dict: """L2: Working memory integration.""" # Add to working memory add_working_memory(user_input, 'user') ``` ```python def run(user_input: str) -> Dict: """Main entry point - execute five-layer thinking and return result.""" # Execute thinking thought_trace = five_layer_thinking(user_input) # Select skill selected_skill = select_skill(user_input) # Build response final_response = build_response(user_input, thought_trace, selected_skill) # Auto-save all memory after each run save_json(WORKING_FILE, working_memory) save_json(EPISODIC_FILE, episodic_memory) save_json(SEMANTIC_FILE, semantic_memory) save_json(META_FILE, meta_memory) ``` ### Technical Analysis Every input processed by the thinking pipeline is written to a plaintext JSON file. The implementation does not: - Request consent before enabling persistence. - Identify or redact passwords, API tokens, private keys, personal information, or proprietary data. - Encrypt persisted content. - enforce restrictive file permissions. - Provide a user-facing deletion or retention mechanism. - Isolate memory by ...[truncated 1391 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
global_cognitive_brain.py:275
Finding

Persistent Prompt-Injection Risk Through Untrusted Memory Replay

Content
View full analysis
Dict: """L2: Working memory integration.""" # Add to working memory add_working_memory(user_input, 'user') # Retrieve related dialogues recent_dialogues = working_memory.get('recent_dialogues', []) related_dialogues = recent_dialogues[-5:] # Last 5 messages # Count related patterns user_keywords = layer1_result['intent_keywords'] related_count = sum( 1 for d in recent_dialogues if any(word in user_keywords for word in extract_keywords(d.get('message', ''))) ) return { 'recent_dialogues': related_dialogues, 'related_found': related_count, 'related_examples': related_dialogues[-3:] if related_count > 0 else [] } ``` The documented integration pattern is: ```python from skills.global_cognitive_brain import build_context def process_message(user_input): # Automatically inject memory context enriched_prompt = build_context(user_input) # Call LLM response = call_llm(enriched_prompt) # Record dialogue from skills.global_cognitive_brain import add_working_memory add_working_memory(user_input, response) return response ``` ### Technical Analysis User-controlled messages are stored without any distinction between instructions and data. Recent messages are then returned in the thought trace as `recent_dialogues` and `related_examples`. The documentation explicitly recommends injecting memory into a future LLM prompt. No controls establish a trust boundary around recalled content. In particular, the implementation does not: - Quote or delimit memory as untrusted historical data. - Remove instruction-like statements from recalled mes ...[truncated 1807 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
global_cognitive_brain.py:19
Finding

Memory Path Escapes the Skill Directory and Is Modified During Import

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
brain_memory/working.json:1
Finding

Runtime Conversation and Device State Included in the Distributed Package

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (21)

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs automatic retention of every user input across conversations and positions that memory as part of future reasoning. In a multi-session assistant context, this creates a direct natural-language data leakage path where prior secrets, personal information, or internal project details can be recalled or inferred in later prompts.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The context builder is described as injecting all relevant remembered content into prompts before each conversation. This broad prompt enrichment can disclose sensitive historical information to downstream models or users and increases the blast radius of any prompt injection, summarization error, or access control failure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The skill documentation and examples are presented entirely in Chinese and describe a globally enforced cognitive mode, but they do not mention any ability for users to choose language or locale. For a broadly scoped skill, this can indicate a language policy issue if the skill experience is effectively constrained to a specific language without opt-in.

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 says all inputs are automatically added to working memory and preserved across sessions, but it does not present a clear, prominent privacy warning or consent mechanism. Users may unknowingly provide secrets, credentials, or personal data that are then retained and resurfaced later.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guardian behavior describes deleting corrupted JSON files and rebuilding them automatically, but does not warn users that this can destroy stored memory content. Silent destructive recovery can cause irreversible loss of user data or audit history.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage log records every run's input by default, creating a broad plaintext logging channel for user-provided content. If users include secrets or regulated data, the log becomes a secondary sensitive datastore that may be retained longer, accessed more widely, or handled less securely than intended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring includes the phrase '強制五層思考' ('forced five-layer thinking'), and the exported description is written only in Chinese. This suggests a potentially mandatory language/interaction policy without indicating user choice or opt-in, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file persists the user's raw natural-language query and related activation/context features in a broad, unconstrained form. Even though the example input is not highly sensitive, storing free-form user input and reasoning-adjacent metadata without minimization or exclusion rules can capture secrets, personal data, or prompt-injection content and make that data available to later components.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file retains user/query content and detailed system-state data, including prior prompts, inferred task types, timestamps, and semantic facts, without any visible disclosure or consent mechanism. This creates privacy and security risk because persisted interaction history can reveal user behavior, internal agent logic, and operational state that could be misused if exposed or reused across sessions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file stores many broad, generic user prompts in working memory, including action-oriented requests such as reviewing pull requests, creating GitHub issues, checking systems for vulnerabilities, and auditing SSH/firewall settings. If this JSON is later injected into an LLM prompt as context, these entries can act as unintended activation triggers or steer the model toward irrelevant or higher-risk behaviors, especially because they are repeated and unscoped.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module defines persistent local storage for working, episodic, semantic, and meta memory and later writes user-derived content into those files. In a skill/router context, retaining cross-session user data without access controls, minimization, or disclosure creates a real privacy and data-retention risk, especially if secrets or sensitive prompts are captured.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

User dialogue is appended to persistent working memory with timestamps and no user-facing disclosure, consent, or retention notice. This creates a privacy vulnerability because ordinary use of the skill silently records conversational content that may include credentials, personal data, or confidential business information.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill persistently logs raw user messages and then reuses prior dialogue as context without any filtering, classification, or privacy boundaries. That makes sensitive information retrievable in later interactions and increases the chance of unintended disclosure across sessions or users sharing the same environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring describes a "Global Cognitive Brain - Multi-layer thinking engine with persistent memory," but this section actively routes requests to external named skills such as github, sql-toolkit, tavily-search, multi-search-engine, frontend, and weather. That orchestration capability is broader than a pure internal 'thinking engine' and is not justified by the available description.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The function auto-saves all memory stores after every run, making persistence broad and implicit rather than deliberate. This amplifies privacy and leakage risks because any transient or accidental sensitive input becomes durable across future sessions and outputs.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The response builder directly injects related semantic facts into normal output, and those facts may have been populated from prior sensitive inputs. This creates a concrete data-leak path where previously saved confidential content can be surfaced to a later prompt without authorization checks or sensitivity filtering.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The package description is written entirely in Traditional Chinese and includes the term '強制' ('forced'), indicating a mandated behavior without any visible option for user language choice. This can violate language/locale policy because the manifest does not document that the skill is region-specific or offer an opt-in for the language constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The stored natural-language inputs include both English and Traditional Chinese requests, but the file provides no accompanying instruction about language choice, user preference, or locale handling. If these examples influence agent behavior, they can implicitly steer language output without an explicit user opt-in or documented locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file includes a natural-language comment and implementation that preferentially enables Chinese tokenization through jieba when available. This introduces a locale-specific behavior path without any visible user choice, opt-in, or documented justification that the skill is intended only for Chinese-language use cases.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The run() docstring claims to execute five-layer thinking, but the function also performs skill selection and persists all memory stores. This mismatch can mislead integrators and reviewers, causing them to invoke the function without realizing it triggers data retention and cross-session state changes.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
70% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 27)May include surrounding context.

json
"homepage": "https://clawhub.com/skills/global_cognitive_brain",
  "openclaw": {
    "min_version": "1.0.0",
    "max_version": "*",
    "compatible_models": ["*"]
  },
  "dependencies": [],

Static analysis

No suspicious patterns detected.