Back to skill

Security audit

BOOK BRAIN – LYGO 3-Brain Filesystem Helper

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a workspace organizer, but it asks users to run mutable installers and includes a helper script that can overwrite files despite promising additive-only behavior.

Install only after reviewing the publisher and pinning exact versions. Run scaffold_haven.py in dry-run first, approve only a specific workspace root, and avoid using write_ref_stub.py on absolute paths, existing files, symlinks, or paths outside the intended reference directory. Do not store secrets in the generated memory or reference files.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/write_ref_stub.py:13
Finding

Unrestricted Reference-Stub Path Allows Existing Files to Be Overwritten

Content
View full analysis
{args.resonance_to}") for line in args.lines: lines.append(line) lines.append("") out = args.out out.parent.mkdir(parents=True, exist_ok=True) out.write_text("\n".join(lines), encoding="utf-8") ``` ### Technical Analysis The `--out` argument accepts an unrestricted absolute or relative filesystem path. The destination is not constrained to an approved workspace or reference directory. The script also does not validate the expected `.ref.txt` or `.md` extension, reject symbolic links, or refuse an existing destination. `Path.write_text()` opens the destination for truncating write. Consequently, an existing writable file is silently replaced. This behavior conflicts with the additive-only and no-overwrite guarantees declared in: - `SKILL.md:3` - `references/AGENT_CONTRACT.md:9,15` - `references/SECURITY.md:9,12` The vulnerability does not independently elevate operating-system privileges; it operates with the permissions of the invoking process. However, within that permission boundary, it provides an unrestricted file-overwrite primitive. ### Attack Path 1. An attacker influences a command, automation input, or agent-generated invocation of `write_ref_stub.py`. 2. The attacker supplies an existing writable file through `--out`, such as a project configuration, agent stat ...[truncated 1115 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:11
Finding

Installation Instructions Execute a Mutable Unpinned Package

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The code generally matches the additive scaffolding purpose: it creates folder structure and seed files, defaults to dry-run, and only creates files if they do not already exist. However, key declared behaviors are absent: there is no implementation for generating .ref.txt outer links or daily indexes. The script instead creates a simpler set of directories plus INDEX/state seed files and appends a log entry. These differences are material enough that the declared description overstates capabilities the code chunk does not provide.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly instructs file reads and writes and describes scaffolding directories and indexes, but it does not declare an explicit tool scope such as allowed-tools or permissions. This creates ambiguity about what filesystem access the agent may use, which can lead to broader-than-intended write access in environments that rely on declarative scoping.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The install command uses 'npx clawhub@latest', which pulls whatever package version is current at execution time. This is a supply-chain risk because a compromised or breaking upstream release could be fetched and run unexpectedly, and the skill encourages users to execute it directly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This second install command also uses 'npx clawhub@latest' for the paired skill, creating the same unpinned remote execution risk. Because the workflow recommends pairing with another skill, the attack surface expands to multiple packages fetched dynamically at runtime.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The instruction 'npx clawhub@latest inspect ...' fetches and executes the latest package version at runtime, which is an unpinned supply-chain risk. If the package or one of its dependencies is compromised, or a breaking/malicious release is published, users following the skill could execute unreviewed code on their machine.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.