Back to skill

Security audit

Senior Frontend

Security checks for vulnerabilities and agentic risk

Overview

This frontend skill is mostly coherent, but it broadly auto-activates and directs agents to run mutable remote package commands without clear user approval or version pinning.

Install only if you are comfortable with a strongly opinionated frontend workflow. Before following its setup commands, pin the shadcn package version, run dependency changes inside the intended project only, review lockfile changes, and confirm the stack fits your project requirements.

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

Note
Location
SKILL.md:130
Finding

Unpinned Package Execution Through a Mutable Latest Tag

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:130-136
Vulnerability Type: Supply-chain risk caused by executing an unpinned third-party package
Risk Level: Warning

Vulnerable Code

markdown
### shadcn/ui as Foundation

Always start with shadcn/ui components. Never reinvent what shadcn already does well:

```bash
# Core components to install for most projects
npx shadcn@latest add button card dialog dropdown-menu input label
npx shadcn@latest add navigation-menu sheet tabs tooltip badge separator
npx shadcn@latest add avatar command popover scroll-area skeleton
text

### Technical Analysis

The Skill instructs the agent to invoke `npx` with the mutable `shadcn@latest` package specifier. Depending on the local npm configuration and cache state, `npx` may retrieve the package from a remote registry and execute its command-line code immediately.

The `latest` tag does not identify an immutable, previously audited release. Its target can change after this Skill has been reviewed. Consequently, the code executed during a future Skill invocation may differ from the code available during this audit. The instruction also lacks an integrity check, provenance verification, lockfile requirement, or explicit approval step before external package execution.

This is an insecure dependency practice rather than evidence that the current shadcn package is malicious.

### Attack Path

1. An attacker compromises the upstream package publisher, registry account, release pipeline, or another component controlling the package release.
2. The attacker publishes a malicious release and causes the mutable `latest` tag to resolve to it.
3. The Skill is used for a frontend task, and the agent follows its mandatory shadcn/ui setup guidance.
4. `npx shadcn@latest ...` retrieves and runs the changed package code.
5. The malicious package executes with the privileges of the user or agent process and can modify the working project or access other resources availabl
...[truncated 764 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the mutable package tag with an exact, reviewed version, for example:

    bash
    npx --yes shadcn@X.Y.Z add button card dialog dropdown-menu input label
    
  2. Record the selected dependency and transitive dependencies in a committed lockfile.

  3. Verify registry provenance, package signatures, and integrity metadata before execution where supported.

  4. Require explicit user approval before downloading or executing packages that are not already installed.

  5. Prefer installation through the project's package manager followed by execution from the locked local dependency:

    bash
    npm install --save-dev --save-exact shadcn@X.Y.Z
    npm exec -- shadcn add button card dialog dropdown-menu input label
    
  6. Run package installation in a restricted environment with minimal filesystem access, no unnecessary secrets, and constrained network permissions.

  7. Review release notes and package contents before updating the pinned version. Use automated dependency scanning, but do not allow automatic execution of unreviewed updates.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The metadata defines extremely broad auto-trigger conditions such as generic requests to build pages, review UI, improve UX, or make something look professional. In an agentic environment, this can cause the skill to activate in ordinary conversations where the user did not explicitly request this specialized behavior, overriding safer or more appropriate tooling and expanding the skill's influence unexpectedly. The danger is amplified because the skill also imposes strong process and stack constraints once triggered.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/design-excellence.md (reported line 323)May include surrounding context.

Native Modal & Overlay Patterns

html
<!-- Modal: use native <dialog> with inert -->
<main inert><!-- content behind modal --></main>
<dialog open><!-- focus stays here; Escape closes --></dialog>

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that output is always production-ready Next.js + Tailwind CSS + shadcn/ui code, which hard-codes a technology choice regardless of user constraints. In agent settings, this becomes a natural-language policy override that can bias outputs away from user requirements, organizational standards, or security-approved stacks, potentially leading to noncompliant code generation or dependency introduction without informed consent. The risk is contextual rather than exploit-style, but it is a real control issue.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
68% confidence
Finding

The instruction 'NEVER use these overused fonts' imposes a rigid style policy regardless of user preference or organizational standards. Natural-language constraints like this can override legitimate user or team choices unless the file makes clear that users may opt in to exceptions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.