Back to skill

Security audit

Obsidian笔记CLI

Security checks for vulnerabilities and agentic risk

Overview

This is a real Obsidian vault utility, but it can rewrite many local notes without safeguards and has some misleading command behavior.

Review this before installing if your Obsidian vault contains important personal or work notes. Use it only on a backed-up or version-controlled vault, avoid running bulk replace on untrusted vaults, and treat search and replace patterns as regular expressions even when the interface suggests otherwise.

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

Error
Location
obsidian-cli.py:145
Finding

Vault Boundary Bypass Through Symbolic-Link Writes

Content
View full analysis
/path/to/writable/target.md`. 2. The target is a Markdown-named file outside the vault and contains text matching the replacement expression. 3. The victim opens o ...[truncated 984 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
obsidian-cli.py:138
Finding

Unconditional Regular-Expression Interpretation in Search and Bulk Replacement

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior does not align with the analyzed behavior, including overstated export/format support and tag-management claims. Security-relevant mismatches reduce user ability to make informed consent decisions and can hide unexpected file handling behavior, especially in a tool that directly accesses local knowledge-base contents.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises direct operations on a local Obsidian vault, including search, export, and batch replacement, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: an agent may gain undeclared file read/write capability over user notes, making sensitive data access and destructive edits harder to constrain or review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes bulk replacement, tag changes, export, and cleanup of empty or duplicate notes without any warning that these operations may directly modify or delete user files. In the context of a local Obsidian vault, this is particularly risky because notes often contain high-value personal or work data and changes may be irreversible if backups are absent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The usage example demonstrates a bulk replace command operating on the entire local knowledge base without warning that it will directly rewrite note contents. This can lead users or agent systems to trigger widespread unintended edits, corrupt notes, or alter sensitive records at scale with little friction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Comments, help text, and runtime messages are consistently hard-coded in Chinese, and the script explicitly sets stdout encoding behavior. This imposes a specific language/locale experience without user opt-in or any mechanism to select another language, which matches the policy's language-choice concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The replace command performs in-place writes to every matching markdown file in the vault, which can modify large amounts of user data irreversibly. Although progress is printed, there is no confirmation prompt, dry-run safeguard, or warning comment/docstring disclosing the destructive nature of the operation before writes occur.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argument parser documents a '--regex' option as if regex behavior is optional, but cmd_search compiles args.keyword directly with re.compile at L040 and never checks args.regex. This creates an active documentation/interface contradiction: users are told regex must be enabled explicitly, while the implementation always enables regex semantics.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI exposes a '--format' option with choices 'markdown', 'html', and 'txt', implying export conversion capability. However, cmd_export ignores args.format entirely and simply writes the original markdown content to the output path at L185-L186, so the documented capability contradicts actual behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The export command creates directories and writes copies of note contents to an output path, which affects user data placement on disk. While it prints destination progress, the code lacks an up-front disclosure in comments/docstrings or a stronger warning that notes will be copied out of the vault to another location.

Content

No source excerpt is available for this finding.