Back to skill

Security audit

Native UI

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Expo/React Native UI guidance skill, with install and privacy best-practice caveats but no evidence of hidden, deceptive, destructive, or exfiltrating behavior.

Install from a pinned ClawHub version or reviewed commit when possible, and review generated media code so camera and microphone permissions are requested only after a clear user action. Use the WebGPU/native-build guidance only for projects that actually need custom native graphics support.

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

T08 · Insecure Dependencies

Warning
Location
README.md:27
Finding
Unpinned npx Installers Retrieve and Execute Mutable Third-Party Content<![CDATA[ ## Vulnerability Details **File Location**: `README.md:27-35`; `SKILL.md:57-60` **Vulnerability Type**: Untrusted and mutable dependency installation **Risk Level**: Medium ### Vulnerable Code `README.md:27-35`: ```bash npx add https://github.com/wpank/ai/tree/main/skills/frontend/native-ui ``` ```bash npx clawhub@latest install native-ui ``` `SKILL.md:57-60`: ```bash npx clawhub@latest install native-ui ``` ### Technical Analysis The installation instructions invoke packages through `npx`, which can download and execute package code, including CLI entry points and potentially package lifecycle scripts. The commands do not pin all retrieved content to immutable, independently verifiable artifacts: - The GitHub source references the mutable `main` branch rather than a commit hash. - `clawhub@latest` explicitly selects a mutable package release. - No checksum, signature, or integrity value is provided. Consequently, the code ultimately installed or executed can differ from the artifact reviewed during this audit. This creates a supply-chain trust boundary in which compromise of the npm package, registry account, GitHub account, repository, branch, or transitive dependency may result in execution of substituted code. No compromise or malicious remote payload was observed in the audited files. The vulnerability is the unsafe installation pattern and lack of immutable dependency verification. ### Attack Path 1. An attacker compromises the relevant package publisher, registry entry, GitHub account, repository, or one of its dependencies. 2. The attacker publishes a malicious `latest` package release or modifies content on the referenced `main` branch. 3. A user follows the documented installation command. 4. `npx` downloads the current remote package or installer rather than an immutable reviewed artifact. 5. The malicious CLI code or lifecycle script executes with the privileges of the user running the command. 6. The payload can access resou ...[truncated 690 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `clawhub@latest` with a reviewed, exact package version. 2. Pin GitHub installations to a full commit SHA instead of the mutable `main` branch. 3. Publish and verify cryptographic checksums or signed release attestations. 4. Commit and enforce a lockfile containing package integrity metadata. 5. Prefer a trusted package registry with provenance information and protected publisher accounts. 6. Review transitive dependencies and package lifecycle scripts before installation. 7. In CI, use a restricted, non-privileged runner without production credentials and with minimal filesystem access. 8. Document the expected package name, exact version, source commit, and verification procedure. ]]>

T08 · Insecure Dependencies

Note
Location
references/webgpu-three.md:21
Finding
Peer-Dependency Validation Is Bypassed for Native WebGPU Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `references/webgpu-three.md:21-25`; repeated as generic guidance at `references/webgpu-three.md:485-493` **Vulnerability Type**: Unsafe dependency resolution and permissive version constraints **Risk Level**: Low ### Vulnerable Code `references/webgpu-three.md:21-25`: ```bash npm install react-native-wgpu@^0.4.1 three@0.172.0 @react-three/fiber@^9.4.0 wgpu-matrix@^3.0.2 @types/three@0.172.0 --legacy-peer-deps ``` ```text Note: `--legacy-peer-deps` may be required due to peer dependency conflicts with canary Expo versions. ``` `references/webgpu-three.md:485-493`: ```bash npm install <packages> --legacy-peer-deps ``` ### Technical Analysis The documented installation command combines permissive caret ranges with `--legacy-peer-deps`. Caret ranges allow npm to select later compatible releases that were not necessarily included in the original review. The `--legacy-peer-deps` option additionally suppresses npm's peer-dependency compatibility enforcement. Peer-dependency conflicts can indicate that packages expect incompatible versions or runtime contracts. Ignoring these conflicts can produce an unreviewed dependency graph containing incompatible native modules. It also reduces the effectiveness of dependency-resolution safeguards when a compromised or unexpectedly changed package version falls within an allowed range. The audited documentation identifies exact tested versions conceptually, but the actual command does not pin every runtime package exactly and encourages bypassing peer validation. No malicious dependency was confirmed. ### Attack Path 1. A later package version is published within one of the permitted caret ranges, or a publisher account is compromised. 2. A developer runs the documented command without a lockfile that fixes the previously reviewed dependency graph. 3. npm resolves the newer package or transitive dependency. 4. Peer-dependency conflicts that might otherwise block or ...[truncated 885 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every tested dependency to an exact version without caret or tilde ranges. 2. Generate and commit a lockfile with integrity hashes. 3. Resolve peer-dependency conflicts explicitly instead of using `--legacy-peer-deps`. 4. If the bypass is temporarily unavoidable, document the exact compatible dependency graph and validate it in isolated CI. 5. Disable or strictly review package lifecycle scripts during dependency assessment. 6. Run software composition analysis and vulnerability scanning against direct and transitive dependencies. 7. Use automated dependency updates only through reviewed pull requests with reproducible build and test results. 8. Revalidate native packages whenever Expo, React Native, or WebGPU dependencies change. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (17)

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The README instructs users to run a remote package/install command via `npx add` against a GitHub URL without pinning to an immutable version, tag, or commit. That creates a supply-chain risk because the referenced content can change over time, causing future installs to execute or fetch different code than originally reviewed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
Using `npx clawhub@latest install native-ui` pulls and executes the latest version of the installer at runtime, which is mutable and could introduce unreviewed behavior if the package is compromised or updated unexpectedly. This is a classic supply-chain exposure because the command trusts whatever code is current at execution time.

Session Persistence

Medium
Category
Rogue Agent
Content
From your project root:

```bash
mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/frontend/native-ui .cursor/skills/native-ui
```
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/frontend/native-ui .claude/skills/native-ui
```
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/frontend/native-ui ~/.claude/skills/native-ui
```
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: native-ui
model: standard
version: 1.0.0
description: >
  Building native mobile UIs with Expo Router and React Native. Covers routing,
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
The installation command uses `npx clawhub@latest install native-ui`, which fetches and executes the latest published package code at runtime. Unlike the Expo examples, this directly installs the skill through a third-party package and increases supply-chain risk if the package is compromised, typosquatted, or updated maliciously.

Behavior Manipulation

Medium
Category
Prompt Injection
Content
## Best Practices

- Always use SF Symbols over vector icon libraries
- Match symbol weight to nearby text weight
- Use `.fill` variants for selected/active states
- Use PlatformColor for tint to support dark mode
Confidence
70% confidence
Finding
Subtle instructions detected that may alter agent decision-making or introduce hidden biases.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The guidance explicitly recommends requesting camera permission eagerly, which can normalize prompting for sensitive access before clear user intent is established. In a mobile UI skill, this is risky because downstream developers may copy the pattern and collect camera access earlier than necessary, degrading privacy expectations and increasing the chance of overbroad data access.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The microphone example requests recording permission automatically on component mount, before the user explicitly chooses to record. This is dangerous because microphone access is highly sensitive, and permission prompts triggered without user action can surprise users, encourage dark-pattern implementations, and lead developers to request recording capability more broadly than necessary.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The instruction to use this skill for 'ANY 3D graphics, games, GPU compute, or Three.js features' is extremely broad and can cause the agent to invoke the skill in contexts it was not carefully scoped for. Over-broad activation increases the chance of irrelevant or unsafe guidance being applied automatically, especially because the skill includes forceful configuration changes, custom native setup, and build commands.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The line says to 'Never use FontAwesome or Ionicons,' which is a hard natural-language prohibition on tooling choice. While not a security issue, it is a policy-like constraint stated categorically and may be inappropriate if different platforms, accessibility needs, or project contexts require alternatives and no exception path is documented.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The instruction says to "Always prefer NativeTabs ... for the best iOS experience," which imposes a fixed platform-specific choice in natural language rather than offering a user or project-context choice. This can be read as forcing a specific platform-oriented preference instead of allowing locale/platform needs to be selected explicitly.

Static analysis

No suspicious patterns detected.