Back to skill

Security audit

Save to Obsidian

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but its SSH upload script is broader than needed and can transfer arbitrary readable files to runtime-supplied destinations.

Review this before installing if your agent can read sensitive local files or has broad SSH access. Use a dedicated SSH key restricted to the intended vault, keep the vault destination fixed in trusted configuration, upload only staged markdown files, and require confirmation before transfer or overwrite.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/save-to-obsidian.sh:8
Finding

Unrestricted Local File Transfer and Unvalidated SCP Destination

Content
View full analysis
[ssh_host] [filename_override]}" VAULT_DIR="${2:?Usage: $0 [ssh_host] [filename_override]}" SSH_HOST="${3:-${OBSIDIAN_HOST:-}}" FILENAME="${4:-$(basename "$SOURCE")}" if [[ -z "$SSH_HOST" ]]; then echo "Error: SSH host required (arg 3 or OBSIDIAN_HOST env var)" exit 1 fi # Sanitize filename (no spaces, safe for iCloud) SAFE_FILENAME=$(echo "$FILENAME" | tr ' ' '-' | tr -cd '[:alnum:]._-') if [[ -z "$SAFE_FILENAME" ]]; then SAFE_FILENAME="obsidian-note-$(date +%Y%m%d-%H%M%S).md" fi DEST_PATH="${VAULT_DIR}/${SAFE_FILENAME}" echo "Saving to Obsidian..." echo " Source: $SOURCE" echo " Dest: ${SSH_HOST}:${DEST_PATH}" if scp "$SOURCE" "${SSH_HOST}:${DEST_PATH}"; then ``` ### Technical Analysis The script accepts the source path, remote vault path, and SSH destination through unrestricted command-line arguments or an environment variable. It does not verify that the source is: - A regular file. - A Markdown file. - Located in a dedicated temporary directory. - Not a symbolic link to a sensitive file. Although shell quoting prevents ordinary word splitting and shell metacharacter expansion, it does not establish that the supplied values are safe operands for `scp`. Values beginning with option-like syntax or containing unsafe remote-path syntax may be interpreted by `scp`, SSH, or the remote shell, depending on the installed OpenSSH version and transfer mode. The Skill only needs to transfer generated Markdown content to one preconfigured Obsidian vault. Permitting arbitrary source files and runtime-controlled destinations exceeds that minimum capability. The reference to `~/.ssh/id_rsa` in `SKILL.md:101` is documentation only. The reviewed proj ...[truncated 1512 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (9)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

scp /tmp/my-note.md myuser@vault.example.com:~/Obsidian/MyVault/

Clean up

rm /tmp/my-note.md

text

**Configuration:** The agent should use the SSH host and vault path configured in workspace TOOLS.md

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

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

md
|----------|-------------|--------------|
| SSH host | Hostname/IP of the remote machine hosting the Obsidian vault | TOOLS.md (e.g., `myserver.local`) |
| SSH user | Username on the remote machine | TOOLS.md (e.g., `your-username`) |
| SSH key path | Path to SSH private key (default: `~/.ssh/id_rsa`) | TOOLS.md |
| Vault path | Absolute path to Obsidian vault on remote machine | TOOLS.md (e.g., `~/Obsidian/MyVault/`) |

**Example TOOLS.md entry:**

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The changelog documents added trigger phrases such as "save this", "copy output", and "add to vault", which are broad and lack clear scoping constraints. In an agent skill that exfiltrates or transfers user content to a remote system over SSH, ambiguous triggers increase the chance of accidental activation on unrelated content, causing unintended remote storage of sensitive data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description says the skill saves content to a remote Obsidian vault via SSH but does not clearly warn that content will leave the local environment and be transferred to another machine. Users or downstream agents may treat this as a harmless formatting or local-save tool, which raises the risk of unintentionally transmitting sensitive notes, credentials, or proprietary text.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 20)May include surrounding context.

md
1. Copy this skill to your OpenClaw skills directory
2. Set up SSH access to the remote machine hosting your Obsidian vault
3. Create a script at `~/.openclaw/scripts/save-to-obsidian.sh` that copies files to your vault location
4. Ensure the script is executable and works with your SSH key

Example script:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are very broad and provide no scope constraints, so an agent may invoke this skill whenever a user mentions Obsidian or saving content, even if the user did not explicitly intend a remote transfer. Because the skill sends content over SSH to a remote vault, overbroad activation increases the chance of unintended exfiltration of sensitive generated or user-provided data.

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 states that duplicate filenames are overwritten silently and does not require the agent to warn or confirm with the user before performing the transfer. This creates a realistic data-loss risk because an existing note in the remote vault can be replaced without notice, especially when filenames are derived or sanitized automatically.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases "add this to my vault" and "put this in obsidian" are broad, natural-language requests that can easily overlap with ordinary user intents unrelated to an explicit file-transfer action. In a skill that performs remote SSH-based writes to a vault, accidental invocation could cause unintended persistence of sensitive or transient content to a remote system.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The listed trigger examples ("save to obsidian", "send to obsidian", "copy to obsidian") are somewhat clearer than generic phrases, but still omit constraints around what content is sent, where it is stored, and whether user confirmation is required. Because this skill writes markdown to a remote Obsidian vault via SSH, ambiguous invocation semantics can still lead to unintended transfer of sensitive or excessive content.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.