Back to skill

Security audit

obsidian-cli

Security checks for vulnerabilities and agentic risk

Overview

This skill is mainly an Obsidian command helper, but it gives an agent broad command, file, plugin, sync, and JavaScript execution authority without clear enough limits.

Review this skill before installing. Use it only for explicit Obsidian vault tasks, avoid running eval or watch commands on untrusted input, require confirmation before delete/overwrite/restore/sync/plugin actions, and prefer the official Obsidian CLI enablement path over a global unpinned npm install.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:538
Finding

Unverified Global Installation of an Unpinned npm Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 538
Vulnerability Type: Supply-chain risk from an unverified and unpinned dependency
Risk Level: Medium

Vulnerable Code:

bash
npm install -g obsidian-cli

Technical Analysis

The Skill instructs users or an AI Agent to install obsidian-cli globally from the npm registry without specifying an exact version, package integrity value, verified publisher, or official source repository. npm package contents are mutable across releases, so a future invocation of this command may install code different from the code available when the Skill was audited.

Global npm installation also permits package installation and lifecycle scripts to execute under the invoking user's account. The instruction is especially questionable because earlier sections describe the required CLI as an interface enabled and registered from within the Obsidian desktop application. The document does not establish that the npm package is the same official component.

This does not prove that the current package is malicious. The vulnerability is the unsafe dependency acquisition process, which creates exposure to package compromise, ownership transfer, dependency confusion, or installation of an unintended similarly named implementation.

Attack Path

  1. A user asks an AI Agent to configure or use this Skill.
  2. The Agent follows the installation instructions in SKILL.md.
  3. The Agent executes npm install -g obsidian-cli.
  4. npm resolves the package's current mutable release from the configured registry without validating a version or expected integrity digest.
  5. npm downloads the package and may execute its installation lifecycle scripts.
  6. If the package, one of its dependencies, its publisher account, or the configured registry is compromised, attacker-controlled code executes with the permissions of the invoking user.

Impact Assessment

Successful exploita ...[truncated 578 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the global npm installation instruction if the intended CLI is the interface supplied by the Obsidian desktop application.
  2. Direct users to enable and register the official CLI through Obsidian's documented settings, consistently with the earlier prerequisites.
  3. If the npm package is genuinely required:
    • Document its verified publisher and official source repository.
    • Pin an exact reviewed version rather than resolving the latest release.
    • Use a trusted registry and verify package integrity or provenance.
    • Review direct and transitive dependencies before approval.
    • Disable lifecycle scripts where operationally feasible.
    • Prefer a project-local, least-privilege installation over a global installation.
    • Re-audit the dependency before changing the pinned version.
  4. Require explicit user confirmation before an Agent installs executable third-party packages.
  5. Run installation and subsequent commands in a restricted environment without access to sensitive vaults, credentials, or unrelated user files.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises destructive file operations including move, delete, and overwrite without requiring warnings, confirmations, or rollback guidance. In an agent context, that can lead to accidental or prompted data loss across a user's knowledge base.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented eval capability allows execution of Obsidian-internal JavaScript without a strong warning about arbitrary code execution risk. In practice, this can expose local data, modify vault contents, interact with plugins, or be used as a bridge to more dangerous behaviors inside the application environment.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
| 命令执行失败,显示错误信息 | 缺少必要的依赖库 | 运行 `npm list` 检查依赖库是否安装 | 使用 `npm install` 命令安装缺失的依赖库 |
| Obsidian CLI 运行缓慢 | 系统资源不足 | 检查系统资源使用情况,如 CPU、内存和磁盘空间 | 关闭不必要的后台程序,释放系统资源,或升级硬件 |
| 无法连接到远程服务器 | 网络连接问题 | 检查网络连接状态,确认防火墙设置 | 重新连接网络,或调整防火墙设置以允许 Obsidian CLI 连接 |
| Obsidian CLI 无法更新 | npm 配置问题 | 检查 npm 配置文件 `.npmrc`,确认没有错误的配置 | 删除或修改 `.npmrc` 文件中的错误配置,并重新运行更新命令 |


##

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The summary and most of the skill instructions are presented in Chinese, and there is no indication that users may choose another language or that the skill is intentionally region-specific. This can be a natural-language policy issue when a skill imposes a locale or language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill claims command execution is limited by a whitelist or sandbox, but the declared capability is generic exec. That mismatch can cause users or agents to trust untrusted inputs and run arbitrary system commands with broader privileges than the documentation suggests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Manifest 描述将技能定位为 Obsidian 知识库命令行管理工具,核心能力围绕文件、模板、插件、同步、历史、开发工具和 TUI。L115-L118 却宣称支持“代码静态分析与质量评分”“依赖漏洞检测与升级建议”“批量代码审查与报告生成”“CI/CD流水线集成”,这明显超出 Obsidian 管理的已述范围,属于描述层面的能力外延漂移。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The examples demonstrate sync restore and sync on/off operations without emphasizing the risk of overwriting newer content, creating conflicts, or interrupting team workflows. In collaborative vaults, these actions can damage data integrity or availability if triggered carelessly.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

L205-L207 明确写明该 Skill 基于本地 Obsidian CLI、无需额外 API Key,而后文 L265-L266、L288-L290、L301-L303、L317-L319、L366-L368 又反复描述需要配置 API Key、存在 API 认证失败(401) 等远程 API 场景。这不是信息缺失,而是文档对技能运行方式与认证需求的直接自相矛盾。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

An overly broad activation description can cause the skill to trigger in contexts far beyond its intended use. Because this skill has exec and file-operation capabilities, over-activation raises the chance of unnecessary exposure to destructive or code-execution actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The later sections introduce undeclared capabilities such as project initialization, export, and especially watch with execution of a custom command string. Expanding behavior beyond the stated Obsidian-management scope increases the risk of arbitrary command execution and unsafe automation assumptions by an agent.

Content

No source excerpt is available for this finding.