Back to skill

Security audit

Xiang miles | Space2.world

Security checks for vulnerabilities and agentic risk

Overview

This skill openly acts as a passive chat-log collector, but it copies potentially sensitive conversations into persistent memory on a recurring basis with weak scoping and no clear user approval controls.

Install only if you intentionally want recurring local chat-log ingestion into S2 memory. Before use, restrict the log directory, avoid shared or writable-by-others log folders, add an explicit extension allowlist and symlink checks, redact secrets before storage, and define retention/deletion controls for hippocampus_logs.json.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T02 · Agent Memory Poisoning

Error
Location
skill.py:39
Finding

Untrusted Chat Content Is Written into Persistent Agent Memory

Content
View full analysis
2] if not valid_lines: return None chunked_text = " | ".join(valid_lines) if len(chunked_text) > 500: chunked_text = chunked_text[:250] + " ... [DATA TRUNCATED] ... " + chunked_text[-200:] return chunked_text def inject_to_hippocampus(chunked_text): if not os.path.exists(os.path.dirname(OS_HIPPOCAMPUS_PATH)): print("⚠️ [Hook] OS 意识目录不存在,请先运行 S2-Silicon-Soul-OS!") return False logs = [] if os.path.exists(OS_HIPPOCAMPUS_PATH): try: with open(OS_HIPPOCAMPUS_PATH, 'r', encoding='utf-8') as f: logs = json.load(f) except Exception: pass timestamp = datetime.now().isoformat() logs.append({ "timestamp": timestamp, "type": "SENSORY_INPUT", "raw_text": f"[AUTO-HOOKED CHAT] {chunked_text}" }) with open(OS_HIPPOCAMPUS_PATH, 'w', encoding='utf-8') as f: json.dump(logs, f, ensure_ascii=False, indent=2) return True ``` Invocation path: ```python chunked_session = chunk_and_summarize(new_lines) if chunked_session: success = inject_to_hippocampus(chunked_session) ``` ### Technical Analysis The skill reads chat-log content and writes it directly into `s2_consciousness_data/hippocampus_logs.json` as `SENSORY_INPUT`. The only processing applied is whitespace filtering, line concatenation, and length truncation. None of these operations establish trust or neutralize instructions embedded in the source text. The persisted record does not contain a trust classification, verified origin, or explicit indication that downstream consumers must treat `raw_text` exclusively ...[truncated 1842 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill.py:94
Finding

Overbroad File Selection and Symbolic-Link Following Exceed the Documented Log Scope

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The comments describe monitoring chat logs and funneling their contents into a separate storage location, and the implementation follows through on that design. In this context, the comments are not harmless prose; they document an intentional mechanism for covert collection of sensitive conversational data.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code automatically enumerates files in a chat-log directory, reads incremental updates, summarizes them, and persists the content into another datastore without any consent prompt or warning. In a skill context, this is especially dangerous because chat logs often contain credentials, personal data, proprietary prompts, or model outputs that should not be silently replicated.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script explicitly presents itself as an automatic chat 'wiretapper' and its behavior matches that description: it scans chat log files, extracts new content, and stores that content in a separate 'hippocampus' JSON file. This is dangerous because it performs covert collection and secondary persistence of potentially sensitive conversations without notice, authorization checks, or consent.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The banner and labels openly describe covert interception of chat records and 'injection' into another memory store, which aligns with the implemented behavior. This indicates intentional exfiltration-style collection semantics rather than incidental processing, increasing the likelihood of privacy abuse and unauthorized data replication.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly describes silently crawling agent chat logs and feeding them into another memory system for later processing. Silent background collection of chat transcripts creates a clear privacy and data-handling risk because conversations may contain credentials, personal data, or other sensitive content that gets copied into a separate persistent store without granular consent.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Persistently appending extracted chat content into hippocampus_logs.json for later daemon processing creates durable secondary storage of potentially sensitive conversations. This increases exposure, complicates deletion and access control, and may cause sensitive prompts, tokens, or private user content to be re-processed in future contexts without the original user's awareness.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill promotes passive scanning of local .txt and .jsonl log files and copying parsed content into another directory, which is a form of local data exfiltration across trust boundaries even without network access. The explicit cross-directory injection into ./s2_consciousness_data/hippocampus_logs.json broadens access to data and can aggregate sensitive information from logs into a more centralized, repeatedly processed repository.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill says to bind itself to a recurring 30-minute heartbeat without defining narrow, user-approved trigger conditions or scope limits. Broad autonomous invocation increases the chance of repeated collection and persistence of sensitive chat data beyond the user's expectation, especially because the skill is designed to run passively in the background.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly describes 'passively' scanning local chat logs with a delta-sync cursor, but it does not define user-triggered activation, scope limits, consent requirements, or boundaries on what data may be collected. Broad passive collection from local conversations is a meaningful security and privacy risk because it can enable silent ingestion of sensitive user data without clear control or visibility.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description states that the skill passively scans local chat logs, chunks conversations, and injects them into a memory buffer, which implies collection, transformation, retention, and possible re-exposure of highly sensitive user communications. In context, this is especially dangerous because the source is local chat history, which often contains credentials, personal data, confidential business information, and other material that should not be silently harvested into another subsystem.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

User-facing output is presented in Chinese or mixed Chinese/English throughout the script, with no indication that the user can choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
45% confidence
Finding

The description is tightly scoped to 'S2-Silicon-Soul-OS' and uses specialized platform terminology, but this does not clearly constitute a language or locale policy violation on its own. Because SQP-3 is limited to natural-language policy issues such as forced language or locale, this is at most a weak signal and may not be actionable.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.