T08 · Insecure Dependencies
- Location
SKILL.md:259- Finding
Unpinned Third-Party Plugin with Privileged Prompt-Context Injection
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 259-270
Vulnerability Type: Unpinned third-party dependency with access to a privileged prompt-building hook
Risk Level: MediumVulnerable Code
markdown ## Auto-Recall Plugin (Optional) By default this skill provides **manual** ClawKB access — the agent must explicitly call the API to search. For **automatic** knowledge recall on every conversation, install the companion OpenClaw gateway plugin: ```bash openclaw plugins install @hata1234/clawkb-openclawWhat it does:
- Hooks into
before_prompt_build— automatically searches ClawKB before the agent sees each message - Injects relevant knowledge entries into the agent's system context
- Supports multiple ClawKB instances in parallel (e.g. personal KB + company KB + public KB)
- Per-sender token mapping — different users get different access levels, controlled entirely by ClawKB server-side ACL
text ### Technical Analysis The skill recommends installing `@hata1234/clawkb-openclaw` without pinning a version or providing an integrity digest. The dependency's source is not included in the audited project, so its implementation and future updates cannot be verified here. The advertised plugin operates through `before_prompt_build` and injects remotely stored ClawKB entries into the agent's system context. This gives the dependency access to a security-sensitive prompt construction stage. Two related risks result: 1. A compromised package, maintainer account, or distribution channel could deliver arbitrary plugin behavior through a later installation or update. 2. If the plugin does not strictly treat retrieved entries as untrusted data, an attacker able to write or modify ClawKB content could place instructions in an entry and have them inserted into a privileged context. The installation is optional and explicitly disclosed; no evidence in the reviewed files proves that the package is currently malicious. The finding conce ...[truncated 1405 chars]- Hooks into
- Remediation
View remediation
Remediation Suggestions
- Pin the plugin to a reviewed immutable version rather than resolving the latest release.
- Verify the package with a cryptographic integrity digest, lockfile, signed provenance, or equivalent registry verification.
- Provide a link to reviewable source code and document the exact audited commit and package version.
- Run the plugin in a sandbox with minimal filesystem, network, credential, and tool permissions.
- Store ClawKB tokens in a secret manager, restrict each token to the minimum required ACL, and avoid exposing tokens to unrelated plugin components.
- Treat all recalled entries as untrusted data. Delimit them from system instructions and explicitly state that their contents must not override system, developer, or user instructions.
- Sanitize and validate retrieved content before prompt insertion, and require user confirmation before recalled content can trigger consequential tool actions.
- Restrict which ClawKB instances and entry authors may supply automatically recalled content, and maintain audit logs for retrieval and injection events.
- Offer manual recall as the secure default and clearly warn users about the additional trust boundary introduced by automatic context injection.
