Back to skill

Security audit

Realtime React Hooks

Security checks for vulnerabilities and agentic risk

Overview

The skill content is ordinary React real-time hook guidance, but its documented install paths rely on mutable, unpinned remote execution that users should review before installing.

Review or pin the installer before running the documented npx commands, especially in sensitive development environments. The hook examples themselves are conventional, but only connect them to trusted authenticated SSE/WebSocket endpoints and avoid placing sensitive payloads on channels you do not control.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding
Unpinned Package Execution Through ClawHub Installation Command<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16-18` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx clawhub@latest install realtime-react-hooks ``` ### Technical Analysis The installation instructions use `npx` to download and execute the mutable `latest` release of the third-party `clawhub` package. No exact version, package integrity hash, lockfile, or other reproducibility control is specified. Because the `latest` distribution tag can be reassigned to a different release after this audit, the code eventually executed by users is not necessarily the code that was reviewed. This creates a supply-chain trust boundary in which compromise of the package publisher, npm account, registry, release process, or transitive dependency could introduce arbitrary executable behavior. The command is not evidence that the current package is malicious; the vulnerability is that it automatically executes a mutable external dependency without integrity verification. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry entry, or a dependency used by a future `clawhub` release. 2. The attacker publishes malicious code and assigns the `latest` distribution tag to the compromised release. 3. A user follows the documented installation command. 4. `npx` downloads and executes the release currently referenced by `clawhub@latest`. 5. The malicious package executes with the operating-system privileges and environment access of the invoking user. ### Impact Assessment Successful exploitation could permit arbitrary local code execution under the invoking user's account. Depending on that account's permissions and environment, the payload could read or modify accessible source code and configuration files, access environment variables and developer credentials, alter installed skills or tools, and make ...[truncated 202 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `@latest` with an exact, reviewed package version, such as `clawhub@X.Y.Z`. - Verify the package publisher and document the expected package source. - Use lockfiles and npm integrity metadata where installation tooling supports them. - Review the pinned package and its transitive dependencies before recommending execution. - Establish a controlled update process in which new versions are reviewed before the documented pin is changed. - Consider instructing users to download and inspect the package before execution in security-sensitive environments. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:26
Finding
Unpinned Package Execution Repeated in README Installation Instructions<![CDATA[ ## Vulnerability Details **File Location**: `README.md:26-28` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx clawhub@latest install realtime-react-hooks ``` ### Technical Analysis The README independently directs users to execute the mutable `latest` release of the `clawhub` npm package. `npx` may retrieve and immediately run that package, while the `latest` tag allows its implementation to change without any modification to this repository. The instructions provide no exact version, integrity checksum, or immutable source reference. This prevents users from reliably reproducing the reviewed installation path and exposes installation to npm publisher, registry, release-pipeline, and transitive-dependency compromise. ### Attack Path 1. An attacker gains control over a future `clawhub` release or one of its executable dependencies. 2. The compromised release becomes the package identified by the `latest` tag. 3. A user copies the installation command from `README.md`. 4. `npx` retrieves and runs the attacker-controlled release. 5. The payload performs actions allowed to the invoking user. ### Impact Assessment Exploitation could result in arbitrary code execution with the user's existing privileges. Accessible project files, user configuration, environment variables, tokens, SSH configuration, package-manager credentials, and developer tooling could be exposed or modified, subject to local permissions. No privilege escalation mechanism is shown in the audited files. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `clawhub` to an exact reviewed version instead of using `@latest`. - Add integrity and provenance verification to the documented installation process. - Keep approved versions in a controlled manifest or lockfile. - Re-audit each package update before changing the documented version. - Ensure the README and `SKILL.md` use the same reviewed, immutable installation procedure. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:20
Finding
Ambiguous and Mutable Third-Party Installation via npx add<![CDATA[ ## Vulnerability Details **File Location**: `README.md:20-22` **Vulnerability Type**: Unsafe external installer and mutable source reference **Risk Level**: Medium ### Vulnerable Code ```bash npx add https://github.com/wpank/ai/tree/main/skills/realtime/realtime-react-hooks ``` ### Technical Analysis This command invokes an npm executable named `add` through `npx` without specifying an exact package version or integrity value. The generic package name makes the installer identity and trust relationship unclear. The argument also points to content under GitHub's mutable `main` branch rather than an immutable commit. Consequently, both the installer behavior and the referenced source can change after review. A compromise of the npm package, publisher, GitHub repository, repository maintainer, or associated dependency chain could turn this documented installation operation into a code-execution or malicious-content delivery path. The audit does not establish that the current `add` package or repository content is malicious. The confirmed weakness is the absence of an immutable, verifiable installation chain. ### Attack Path 1. An attacker compromises or replaces the npm package resolved by `npx add`, or gains write access to the referenced GitHub repository. 2. The attacker modifies the installer or content reachable through the `main` branch. 3. A user runs the command from the README. 4. `npx` retrieves and executes the resolved `add` package. 5. The installer processes attacker-controlled remote content or directly executes malicious package logic. 6. The payload operates with the invoking user's permissions and may install altered skill content for later use. ### Impact Assessment A compromised npm installer could execute arbitrary commands with the invoking user's privileges. A compromised repository reference could install malicious or instruction-hijacking skill content, depending on how the exter ...[truncated 278 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace the ambiguous `npx add` invocation with a clearly identified and trusted installer pinned to an exact version. - Reference an immutable Git commit rather than the mutable `main` branch. - Publish and verify a checksum or signed provenance statement for the installed content. - Document the installer's publisher, expected behavior, and required permissions. - Prefer a non-executing download-and-verify workflow before copying the reviewed files into the destination. - Review both installer code and fetched content whenever their pinned versions are updated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (9)

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The README instructs users to execute a remote package/tool via `npx add` without any version pinning or integrity control. This creates a supply-chain risk because future changes to the referenced package or resolver behavior could cause users to fetch and run unexpected code during installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
`npx clawhub@latest install realtime-react-hooks` uses the mutable `latest` tag, which can change over time and cause execution of unreviewed code. For an installation path that likely runs code on the user's machine, this is a meaningful supply-chain exposure even if the current package is benign.

Session Persistence

Medium
Category
Rogue Agent
Content
From your project root:

```bash
mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/realtime/realtime-react-hooks .cursor/skills/realtime-react-hooks
```
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.

Skill Enumeration

Medium
Category
Agent Snooping
Content
From your project root:

```bash
mkdir -p .claude/skills
cp -r ~/.ai-skills/skills/realtime/realtime-react-hooks .claude/skills/realtime-react-hooks
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
#### Claude Code (global)

```bash
mkdir -p ~/.claude/skills
cp -r ~/.ai-skills/skills/realtime/realtime-react-hooks ~/.claude/skills/realtime-react-hooks
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

External Model or Provider Selection

Medium
Category
Excessive Agency
Content
---
name: realtime-react-hooks
model: standard
description: React hooks for real-time data with SSE, WebSocket, and SWR integration. Covers connection management, reconnection logic, and optimistic updates. Use when building React apps with real-time features. Triggers on SSE hook, WebSocket hook, real-time React, useEventSource, live updates.
---
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The description says the skill triggers on phrases including "real-time React" and "live updates," which are broad enough to appear in normal discussion rather than a clear invocation. The file does not provide tighter trigger constraints or negative examples to distinguish when the skill should or should not activate.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The installation command uses `npx clawhub@latest`, which pulls and executes the newest published package version at install time. This creates a supply-chain risk because a compromised or malicious upstream release could be executed immediately by users without version review or integrity pinning.

Missing User Warnings

Low
Confidence
78% confidence
Finding
This markdown file instructs users to create EventSource and WebSocket connections that exchange application data, but it does not include any warning about network behavior, backend trust, authentication, or privacy-sensitive payloads. For markdown files, safety-relevant behaviors that may affect user data or privacy should be disclosed.

Static analysis

No suspicious patterns detected.