Back to skill

Security audit

RagClaw Knowledge Base

Security checks for vulnerabilities and agentic risk

Overview

This local knowledge-base skill is mostly coherent, but it needs Review because it can ingest local files through broad triggers while relying on an unpinned globally installed third-party CLI.

Install only if you trust the external ragclaw CLI publisher and are comfortable with a tool that can index selected local directories, URLs, images, PDFs, and code into persistent local databases. Prefer an exact pinned CLI version, review where ragclaw resolves from on PATH, and use explicit /kb commands with narrow include/exclude, max-depth, and max-files settings before indexing private material.

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
kb.sh:9
Finding

Unpinned Third-Party CLI Dependency and Global Installation Guidance

Content
View full analysis
/dev/null; then echo "Error: ragclaw CLI not found. Install with: npm install -g @emdzej/ragclaw-cli" exit 1 fi ``` `skill.json:65-67`: ```json "dependencies": { "cli": "@emdzej/ragclaw-cli" } ``` ### Technical Analysis The project delegates nearly all substantive functionality to the external `@emdzej/ragclaw-cli` npm package. The dependency declaration does not specify an exact version, and the installation instruction uses `npm install -g` without a version or integrity constraint. Consequently, users following the instruction receive whichever package release the npm registry resolves at installation time rather than a release whose source and integrity were audited with this Skill. This creates a supply-chain trust boundary that is not controlled by the audited repository. If the publisher account, package, registry delivery path, or a future package release is compromised, the globally installed CLI can execute attacker-controlled code. The external package implementation was not included in the audited project, so its internal behavior could not be verified. The wrapper itself quotes `"$RAGCLAW_BIN"` and forwards arguments using `"$@"`; no shell command-injection flaw was identified in that forwarding logic. The issue is specifically the mutable, unpinned external dependency and global installation guidance. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another relevant part of the distribution chain for `@emdzej/ragclaw-cli`. 2. The attacker publishes a malicious release under the expected package name. 3. A user follows the displayed instruction: `npm install -g @emdzej/ragcla ...[truncated 1290 chars]
Remediation
View remediation
``` 3. Record and verify package integrity metadata using an npm lockfile or another reproducible dependency-management mechanism. 4. Prefer a project-local installation over a global installation, and invoke the binary from the controlled local dependency directory. 5. Include the dependency source or a verifiable build artifact in the audit scope before release. 6. Use automated dependency scanning, release-signature or provenance verification, and publisher-account protections. 7. Define an explicit upgrade process in which new dependency versions are reviewed and tested before the pinned version is changed. 8. Consider validating the resolved executable path before invocation so the wrapper does not unintentionally execute an unrelated `ragclaw` binary found earlier in `PATH`. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
**Options:**
- `--db <name>` — Knowledge base name (default: "default")
- `-y` — Skip confirmation prompt

### `/kb embedder list`
List all available embedder presets with RAM requirements and status.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrase "knowledge base" is extremely broad and likely to appear in normal conversation, which can cause the skill to activate when the user did not explicitly intend to invoke it. Because this skill can index files, directories, and URLs, accidental activation could lead to unintended data ingestion or unexpected processing of local or remote content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The phrase "index documents" is a common user request and does not clearly indicate intentional invocation of this specific skill. In this context, accidental routing is risky because the skill supports indexing arbitrary sources and URLs, so a benign conversational request could trigger filesystem or network-affecting operations the user did not mean to authorize.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger "find in docs" is ambiguous and overlaps with ordinary requests for help or document search, making unintentional invocation plausible. This is more dangerous in this skill than in a read-only tool because the same skill also exposes management operations over local knowledge-base data, increasing the chance of unintended action chaining once the skill is selected.

Content

No source excerpt is available for this finding.