Back to skill

Security audit

React Native

Security checks for vulnerabilities and agentic risk

Overview

This React Native skill is a straightforward development checklist with one manual command that has a supply-chain caution but no hidden or automatic behavior.

Before running the npx command, prefer a lockfile-pinned local React Native CLI or an explicit reviewed version. The rest of the skill is ordinary React Native development guidance, but build cleanup commands can change local build artifacts and should be run in the intended project only.

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
SKILL.md:71
Finding

Unpinned Package Execution Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 71
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Complete Code Snippet:

markdown
- `npx react-native clean` for unexplained build failures — clears caches and derived data

Technical Analysis

The documented command invokes react-native through npx without requiring a lockfile-pinned local installation or specifying an exact, reviewed package version. If the requested executable is not available locally, npx may resolve, download, and execute package code from the configured npm registry.

This creates a supply-chain risk because the code executed by the command may differ from the code originally reviewed. Exploitation would require control or compromise of a relevant registry package, registry configuration, dependency-resolution path, or package source. Package lifecycle scripts and the resolved CLI execute with the permissions of the user running npx.

Attack Path

  1. A user follows the cleanup guidance and runs npx react-native clean.
  2. No suitable lockfile-pinned local executable is available.
  3. npx resolves the executable through the configured npm registry or package source.
  4. An attacker-controlled or compromised package/version is selected through registry compromise, unsafe registry configuration, dependency confusion, or another supply-chain failure.
  5. Package installation hooks or CLI code execute on the user's machine with that user's permissions.
  6. The malicious code can access or modify resources available to the invoking account.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user who invokes the command. Potential scope includes the project source tree, environment variables, locally accessible credentials, developer configuration, build artifacts, and other files writable by that acc ...[truncated 145 chars]

Remediation
View remediation

Remediation Suggestions

  • Require react-native to be installed as a reviewed, lockfile-pinned project dependency.
  • Invoke the verified local executable through a package-manager script rather than allowing implicit remote resolution.
  • Configure CI and developer environments to enforce lockfile integrity and use a trusted registry.
  • If direct npx usage is unavoidable, specify an exact reviewed version and disable installation when the package is absent, where supported.
  • Avoid recommending mutable package tags such as latest.
  • Document the expected package name, version, source, and integrity-verification procedure.
  • Consider replacing the instruction with explicit, platform-specific cache-cleaning commands that do not download and execute additional package code.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The skill recommends executing npx react-native without pinning a specific package version. Because npx may fetch the latest package version at execution time, users can receive unexpected or malicious upstream changes, creating a supply-chain risk and reducing build reproducibility. In a developer skill that encourages command execution, this context makes the issue more relevant rather than less.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.