Back to skill

Security audit

Robin

Security checks for vulnerabilities and agentic risk

Overview

Robin is a coherent local commonplace-book skill, but its path configuration and image handling can let normal commands affect files outside the intended library.

Review before installing. Use a dedicated Robin state directory, keep robin-config.json under your control, set topics_dir and media_dir only to simple relative values like topics and media, and do not pass untrusted local image paths. Confirm entry ids before using delete. Prefer a pinned or reviewed source revision instead of a floating install command.

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
src/robin/config.py:27
Finding

Configurable storage paths can escape the Robin state directory

Content
View full analysis
Path: return state_dir(explicit_state_dir) / config.get("topics_dir", "topics") def media_path(config: dict, explicit_state_dir: str | None = None) -> Path: return state_dir(explicit_state_dir) / config.get("media_dir", "media") ``` The resulting topic path is subsequently used for file creation and overwriting: ```python def _add_to_topic(config: dict, explicit_state_dir: str | None, topic: str, entry_text: str) -> str: base = topics_path(config, explicit_state_dir) base.mkdir(parents=True, exist_ok=True) filepath = base / topic_to_filename(topic) if filepath.exists(): content = filepath.read_text(encoding="utf-8").rstrip() out = content + SEPARATOR + entry_text else: out = entry_text filepath.write_text(out + "\n", encoding="utf-8") return filepath.name ``` It is also used by entry deletion logic: ```python def _topic_files(config: dict, explicit_state_dir: str | None) -> list[Path]: base = topics_path(config, explicit_state_dir) if not base.exists(): return [] return sorted(base.glob("*.md")) def _write_chunks(filepath: Path, chunks: list[str]) -> None: if chunks: filepath.write_text(SEPARATOR.join(chunks) + "\n", encoding="utf-8") elif filepath.exists(): filepath.unlink() ``` ### Technical Analysis The `topics_dir` and `media_dir` configuration fields are joined directly to the resolved state directory without validating their types or requiring them to remain beneath that directory. Python path composition does not provide containment by itself: - If the configured compo ...[truncated 2464 chars]
Remediation
View remediation
Path: value = configured if configured is not None else default if not isinstance(value, str) or not value.strip(): raise SystemExit(f"{default} path must be a non-empty string.") relative = Path(value) if relative.is_absolute() or ".." in relative.parts: raise SystemExit(f"{default} path must remain inside the state directory.") root = root.resolve() target = (root / relative).resolve() try: target.relative_to(root) except ValueError as exc: raise SystemExit(f"{default} path escapes the state directory.") from exc return target ``` 4. Use this containment helper in both `topics_path()` and `media_path()`. 5. Revalidate containment immediately before destructive operations to reduce symlink-related time-of-check/time-of-use risk. 6. Validate that `robin-config.json` is a JSON object and that every supported field has the expected type. 7. Add regression tests covering: - Absolute Unix and Windows paths. - `../` traversal. - Nested traversal. - Symlinks leading outside the state directory. - Non-string path fields. - Add, move, delete, search, and media-copy operations under malicious configurations. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
src/robin/media.py:19
Finding

Image validation trusts filename metadata and follows symbolic links

Content
View full analysis
Path: path = Path(value).expanduser() if not path.exists(): raise ValueError(f"Image file not found: {value}") if not path.is_file(): raise ValueError(f"Image path is not a file: {value}") suffix = path.suffix.lower() mime, _ = mimetypes.guess_type(path.name) if suffix not in IMAGE_EXTENSIONS and not (mime and mime.startswith("image/")): raise ValueError(f"Unsupported image type: {value}") return path ``` The accepted path is then copied as follows: ```python def copy_image_to_vault( config: dict, explicit_state_dir: str | None, topic: str, entry_id: str, image_path: str, ) -> str: source = validate_image_path(image_path) destination_dir = media_path(config, explicit_state_dir) / topic_slug(topic) destination_dir.mkdir(parents=True, exist_ok=True) destination = destination_dir / f"{entry_id}{source.suffix.lower()}" shutil.copy2(source, destination) return str(destination.relative_to(state_dir(explicit_state_dir))) ``` ### Technical Analysis The validation determines whether a file is an image from its filename extension and the result of `mimetypes.guess_type()`. The latter also derives its result from the filename rather than inspecting file contents. Consequently, any regular file renamed with a supported image extension is accepted, regardless of its actual format. In addition, `Path.is_file()` follows symbolic links, and `shutil.copy2()` copies the contents of the link target by default. A symbolic link named `photo.png` can therefore point to an arbitrary readable local file and pass the current checks. The issue violates the documented image-only input boun ...[truncated 1678 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose describes a knowledge-management/commonplace-book skill, but the supplied code chunk does not exhibit any such behavior. Instead, it indicates the module is for CLI wrappers for Robin, which is a materially different purpose and unrelated to saving or reviewing personal reference material. Even though the snippet is minimal, based on the provided code there is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill is for filing and reviewing personal knowledge artifacts in a commonplace book. The supplied code does not implement saving, organizing, resurfacing, or reviewing notes or media references. Instead, it is a thin wrapper around robin.cli.doctor_main, explicitly described as checking a Robin library for common health issues via a state directory. That is a materially different primary purpose and capability from the declared note-management behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description emphasizes saving, reviewing, organizing, resurfacing, and reviewing entries in a personal commonplace book. The supplied code chunk, however, is specifically an administrative/management script for moving or deleting entries, as shown by its documented usage (--delete, --move, --topic) and delegation to entries_main(). Deletion is a materially significant capability not mentioned in the description, and moving entries between topics is more specific than the high-level save/review behavior described. While topic organization is broadly related, the primary purpose of this code chunk is entry mutation and removal rather than saving or reviewing content. Therefore, the code exposes undeclared capabilities and is a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a user-facing knowledge capture and review tool. The supplied code chunk is not implementing that primary experience directly; instead, it is a test harness for validating the Robin system. While the test exercises related features such as adding entries, searching, and review/rating, its actual purpose is operational verification, not serving as the commonplace-book skill itself. It also performs undeclared maintenance and administrative actions like doctor, reindex, move/delete, temporary environment setup, and subprocess-based command orchestration. Those are materially different capabilities from the declared personal note-saving/review description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a general-purpose commonplace-book feature focused on saving and reviewing various saved content types. The supplied code, however, specifically exposes a command-line entry point for listing topics and stats from Robin data by calling topics_main(). While topic organization could be related to the broader knowledge-management theme, this chunk does not implement saving notes, reviewing entries, resurfacing items, or handling the cited content types. Its primary behavior is narrower and materially different from the declared purpose, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents an end-user feature for storing and reviewing commonplace-book content. The supplied code does not implement saving notes, resurfacing entries, or reviewing prior entries. Instead, its primary purpose is a 'doctor' utility that audits the on-disk state for consistency and corruption issues. While these checks relate to the same product domain, they are a distinct maintenance/diagnostic capability not represented in the declared purpose. Therefore the description does not accurately match this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about end-user content management: saving, organizing, resurfacing, and reviewing commonplace-book items. The supplied code does not implement those user-facing save/review capabilities. Instead, it tests a maintenance/diagnostic command that audits the library's data integrity and emits diagnostic codes and exit statuses. While this may support a commonplace-book system, its primary purpose is materially different and includes undeclared capabilities such as integrity checking, corruption detection, and command-line diagnostics.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose is a knowledge-capture and retrieval tool for personal notes and references. The actual code chunk does not implement any note-saving, organization, retrieval, or review behavior. Instead, it executes a local self-test script and checks its output, which is a development/testing function unrelated to the stated user-facing capability. This is a material mismatch in primary purpose and behavior.

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 18)May include surrounding context.

md
## What is a Commonplace Book?

A [commonplace book](https://ryanholiday.net/how-and-why-to-keep-a-commonplace-book/) is a personal collection of ideas, phrases, and passages worth keeping. Traditionally, it is a notebook where one gathers quotations, observations, arguments, anecdotes, and striking turns of phrase from what they read or hear, then organizes them so those pieces can be revisited and used later. 
One of its most practical benefits is that it sharpens vocabulary: by repeatedly noticing, recording, and returning to precise language, a reader begins to absorb better words, clearer sentence patterns, and more nuanced ways of expressing ideas. That expanded command of language tends to improve communication, because stronger vocabulary makes it easier to speak and write with accuracy, persuasion, and confidence. 
Over time, a commonplace book becomes more than a record of reading. It turns into a tool for better thinking, better communication, and, by extension, better work, relationships, and decision-making.

## Features

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README advertises that entries can be moved or deleted, but it does not advise agents or users to require confirmation before destructive actions. In an agentic context, ambiguous user prompts or model mistakes could cause irreversible data loss in a personal knowledge base.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The README instructs users to execute npx skills add ... without pinning a specific package version. This creates a supply-chain risk because the latest published package (or a compromised dependency resolution path) could change over time and execute unexpected code during installation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares broad operational behavior—filesystem access, environment-variable handling, shell execution, and even network-relevant URL processing—but does not declare any tool scope or permission boundaries. That makes it easy for a host agent to invoke the skill with more privileges than necessary, increasing the chance of unintended file modification, command execution, or data exposure.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The skill is explicitly stateful and persists user content, metadata, and review history across sessions in local files. Persistent storage of notes, links, images, creators, timestamps, ratings, and topic structure can expose sensitive personal knowledge if the state directory is accessible to other tools, users, or backups without proper controls.

Content

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

md
- Uploaded or local video files are rejected. Ask for a shareable `http(s)` video URL, or save a normal `text` entry that records the local path/context without storing the video file.
- A blank line is required after frontmatter.
- Keep `id` stable when manually editing entries.
- If `robin-config.json` contains invalid JSON, Robin exits with an error; recreate it as `{}` or with the supported config fields.
- If `robin-review-index.json` is missing, Robin can rebuild review state as entries are used. If it is corrupted, back it up or recreate it as `{"items": {}}`, then run `python3 scripts/reindex.py --state-dir <state-dir> --json` to rebuild from topic files.
- If library health is uncertain, run `python3 scripts/doctor.py --state-dir <state-dir> --json` for a read-only diagnostic report.
- Use `python3 scripts/entries.py --state-dir <state-dir> --move <id> --topic <topic>` to move entries and `python3 scripts/entries.py --state-dir <state-dir> --delete <id>` to delete entries. Delete keeps copied media files.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/selftest.py (reported line 63)May include surrounding context.

python
def _run_json(args: list[str], *, expect_success: bool = True) -> dict | list:
    proc = subprocess.run(
        [sys.executable, *args],
        cwd=ROOT,
        text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code performs potentially destructive file operations by calling delete_entry or move_entry and then save_index, but it does not prompt for confirmation before deletion/move and provides no prior user-facing warning beyond the terse CLI argument names. For destructive operations, the file lacks an explicit disclosure in code comments/docstrings or an interactive confirmation at the execution point.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The helper deletes topic files when no chunks remain by calling unlink(), but there is no confirmation prompt, logging, print statement, or explanatory comment/docstring warning that mutation may remove files entirely. Because this is an irreversible filesystem action in a general entry-operations module, users and maintainers are not clearly warned at the point of implementation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

delete_entry removes content from storage and updates the index, but the function contains no confirmation, logging, or explanatory docstring/comment indicating that the operation is destructive. This lacks the user disclosure expected for irreversible deletion of persisted data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

remove_new_media_if_present deletes a file with unlink() when a local media path exists, but the operation is silent and undocumented in the function body. This is a destructive filesystem action that should have some visible disclosure or explanation unless already clearly documented elsewhere.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/test_doctor.py (reported line 152)May include surrounding context.

python
def test_doctor_script_json_smoke(robin_env):
    robin_env["media_dir"].mkdir()
    proc = subprocess.run(
        [sys.executable, str(ROOT / "scripts" / "doctor.py"), "--state-dir", str(robin_env["state_dir"]), "--json"],
        cwd=ROOT,
        text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/test_selftest.py (reported line 11)May include surrounding context.

python
def test_selftest_script_passes():
    proc = subprocess.run(
        [sys.executable, str(ROOT / "scripts" / "selftest.py")],
        cwd=ROOT,
        text=True,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file documents entries.py --delete ID, which removes an entry from the library, but the CLI reference line itself does not warn that the operation is destructive. A clearer warning near the command listing would better disclose the data-impacting behavior before users reach later explanatory text.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The examples section includes a ready-to-run delete command that removes an entry, but the example itself does not carry a cautionary note. Although deletion behavior is described later, users often copy examples directly, so an adjacent warning would improve safety disclosure.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: setuptools has 10 known advisory(ies) (CVE-2013-1633 (Setuptools vulnerable to Man-in-the-middle attacks); CVE-2025-47273 (setuptools has a path traversal vulnerability in PackageIndex.download that lead); CVE-2024-6345 (setuptools vulnerable to Command Injection via package URL) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pytest has 2 known advisory(ies) (CVE-2025-71176 (pytest has vulnerable tmpdir handling); CVE-2025-71176 (pytest has vulnerable tmpdir handling)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.