Back to skill

Security audit

Session Reflect

Security checks for vulnerabilities and agentic risk

Overview

This skill is local and purpose-aligned, but it reads and persists sensitive conversation history and private vault notes with broad scope and limited user controls.

Install only if you are comfortable with Claude session history and recent Obsidian notes being read locally and copied into long-lived vault files. Use a dedicated vault or folder if possible, review generated files for secrets, avoid broad backfills until you understand the scope, and remove the ~/.claude/commands/reflect commands if you no longer want this behavior.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
commands/reflect/default.md:15
Finding

Indirect prompt injection through untrusted session records and Vault notes

Content
View full analysis
{msg}") lines.append("") return "\n".join(lines) ``` From `extract_sessions.py:287-295`: ```python for s in daily_data[date]: lines.append(f"### {s['project']}") lines.append("") for msg in s["messages"]: lines.append(f"> {msg}") lines.append("") return "\n".join(lines) ``` ### Technical Analysis The extraction script places user-controlled session messages into Markdown digest files with only content filtering and truncation. Quoting a message with a Markdown blockquote does not establish a security boundary and does not prevent an AI agent from interpreting the message as an instruction. The slash-command templates then direct the agent to read these generated records, arbitrary recent personal notes, and previous reflection reports. They do not instruct the agent to: - Treat document contents strictly as untrusted data. - Ignore instructions embedded in analyzed files. - Reject requests for additional tool calls or unrelated file access. - Restrict file reads to a precomputed allowlist. - Obtain confirmation before acting outside the reflection workflow. The sanitization logic removes certain tags and fenced code blocks, but ordinary natural-language prompt injection does not require either ...[truncated 1928 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
extract_sessions.py:29
Finding

Incomplete secret redaction can copy credentials into persistent Vault files

Content
View full analysis
str: text = SYSTEM_TAG_PATTERN.sub('', text) parts = CODE_BLOCK_PATTERN.split(text) code_blocks = CODE_BLOCK_PATTERN.findall(text) cleaned_parts = [] for i, part in enumerate(parts): for pattern, replacement in SENSITIVE_PATTERNS: part = pattern.sub(replacement, part) cleaned_parts.append(part) if i < len(code_blocks): cleaned_parts.append('[CODE_BLOCK]') text = ''.join(cleaned_parts) if len(text) > MAX_MESSAGE_LENGTH: text = text[:MAX_MESSAGE_LENGTH] + '\n...[截断]' return text.strip() ``` The corresponding privacy claim in `SKILL.md:75-79` states that API keys, tokens, JWTs, and passwords are automatically redacted. ### Technical Analysis Secret detection is based on a short, case-sensitive list of regular expressions. It only recog ...[truncated 2343 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation claims reflective analysis, goal-drift detection, and behavioral insight generation, but the observed behavior includes accessing local session files and config/state storage and producing digests rather than the described higher-level analysis. This mismatch is dangerous because users may grant trust and run the skill under false assumptions about what data is accessed and what outputs are generated.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill describes behavior that reads Claude session history and writes synchronized outputs into an Obsidian vault, but it does not declare any explicit tool scope such as permissions or allowed-tools. That omission weakens user consent and reviewability because the skill's effective access to local files is broader than its formal declaration, increasing the chance of unintended file access or writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill states that the agent analyzes both synced session digests and 'your own notes in the Vault,' but the description does not prominently warn that unrelated personal notes may be ingested. In this context, that creates a meaningful privacy risk because a journaling or knowledge vault often contains sensitive material far beyond Claude session history.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
81% confidence
Finding

Installing command files into ~/.claude/commands/reflect creates persistent agent behavior that can continue affecting future sessions after initial setup. Persistence is not inherently malicious here, but without prominent disclosure and scoping it increases the long-term blast radius of any unsafe command content or future modifications.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

git clone https://github.com/yuiooo1102-droid/session-reflect.git ~/coding/session-reflect

Or install as Claude Code command

mkdir -p ~/.claude/commands/reflect cp commands/reflect/*.md ~/.claude/commands/reflect/

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to write a new reflection file into the user's Obsidian Vault, but it does not require a user-facing confirmation or warning before modifying personal files. Because the same skill also reads broad personal content from the vault, this creates a privacy and integrity risk: sensitive inferred analysis can be persisted into the user's notes without explicit consent each time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs access to local configuration, personal notes, and conversation history to infer user goals and behavior, but provides no explicit privacy warning, consent step, or data-minimization boundary. Because the data sources are highly sensitive and the analysis is behavioral in nature, users may expose far more personal information than they reasonably expect when invoking the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill writes a generated report into the user's vault without an explicit warning that local files will be modified or a confirmation of the destination path. Silent filesystem writes can create privacy, integrity, and surprise-modification risks, especially when the output contains sensitive behavioral inferences derived from private notes and conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs processing 14 days of conversation history and user notes to infer hidden patterns, preferences, and avoidance behavior, then writing the result into an Obsidian vault. This handles highly sensitive personal data and creates a persistent derived profile, but the skill includes no privacy warning, consent check, minimization guidance, or retention controls, increasing the risk of over-collection, unintended profiling, and exposure if the vault is accessed by others.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language interface, help text, prompts, and output strings are written entirely in Chinese, which creates an implicit locale requirement for use of the skill. There is no indication that users can opt into another language or that the tool is intentionally restricted to a Chinese-speaking environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes higher-level reflective analysis outputs, but the implemented behavior here is limited to generating daily/weekly 'session-digest' markdown containing quoted user messages. There is no code in this file that performs journaling, goal-drift detection, or behavioral-pattern analysis; it functions as an ingestion/export tool instead.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Sync and backfill operations copy session content into another filesystem location without presenting a clear warning at the time of export about privacy implications and persistent duplication. In a session-analysis skill, this omission is more dangerous because the source data is inherently sensitive and users may not expect historical conversations to be bulk replicated outside the original tool storage.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code performs large-scale backfill and persistent replication of Claude session history into an Obsidian vault, creating a second long-lived copy of potentially sensitive conversation data. In this skill context, session histories may contain prompts, secrets, internal notes, and personal data, so broad export materially increases privacy and data-exposure risk even though some regex-based redaction is attempted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to analyze highly sensitive personal content from both conversation history and private notes, then write derived observations back into the user's Vault, but it does not require an explicit consent step for scope, retention, or sensitive-category handling beyond a brief note to avoid secrets. This creates a real privacy and profiling risk: the agent may infer emotional state, habits, priorities, and persistent traits from intimate data and persist those in files without clear user-approved boundaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documented vault structure hard-codes Chinese directory names (对话记录, 自我观察) for output locations, which imposes a specific language/locale choice on users. The file does not indicate that this is optional or configurable, so it may violate language-choice expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Forcing Chinese output without user choice is a genuine trust and usability issue, even if not a severe security flaw by itself. In this context, it can reduce user comprehension of what the agent read and wrote into their vault, which weakens informed consent and makes the file-modifying behavior harder for some users to notice or validate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The principle 中文输出 forces a specific language for the skill's output. Under the policy, locale or language restrictions should either be optional for the user or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction '中文输出' forces a specific language/locale in natural language. Under the policy, this is a violation unless the skill offers user opt-in or clearly documents a justified locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

规则 SQP-3 要求识别语言或 locale 强制策略。这里直接规定所有输出必须为中文,但文档没有提供用户选择语言的选项,也没有说明这是特定区域场景下的必要限制,因此构成自然语言层面的语言政策问题。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.