Back to skill

Security audit

Svelte Component Auditor

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Svelte code-audit skill whose commands are mostly local read-only searches, with one supply-chain caution around an optional unpinned npx tip.

Install is reasonable for Svelte/SvelteKit auditing. Before following the `npx svelte-check` tip, prefer a project-pinned dev dependency and lockfile, or run a verified local copy, especially in repositories containing secrets or sensitive source code.

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:193
Finding

Unpinned Package Execution Through npx

Content
View full analysis

Vulnerability Details

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

Vulnerable Code Snippet:

markdown
- Run `npx svelte-check` for type errors, a11y warnings, and unused CSS

Technical Analysis

The Skill recommends invoking svelte-check through npx without specifying a version or requiring use of a locally installed, lockfile-pinned dependency. If the package is unavailable locally, npx may resolve it from the configured package registry and execute the retrieved package code.

This creates a mutable supply-chain execution path: the code executed during an audit may differ from the code reviewed when the Skill was published. The risk exceeds the minimum privileges required for the Skill's otherwise read-only static analysis because package installation and lifecycle execution can run arbitrary third-party code under the invoking user's account.

This instruction does not itself exfiltrate source code or secrets. The separately flagged searches for private environment imports only inspect local files and print results locally.

Attack Path

  1. An Agent or user follows the recommendation and runs npx svelte-check.
  2. No trusted local installation of svelte-check is available, or package resolution is influenced by the configured registry.
  3. npx retrieves an unpinned package release and its dependency graph.
  4. A compromised package version, transitive dependency, registry, or package lifecycle script executes locally.
  5. The malicious code runs with the privileges of the Agent or user performing the audit and can access resources available to that account.

Impact Assessment

Successful exploitation could permit arbitrary code execution with the invoking user's privileges. Depending on the surrounding environment, this may expose project source code, environment variables, credentials, local files, and network-access ...[truncated 368 chars]

Remediation
View remediation

Remediation Suggestions

  • Require svelte-check to be declared at an audited, exact version in the project's development dependencies and committed lockfile.
  • Execute only the verified local dependency, preferably without network fallback, for example:
    bash
    npm exec --offline -- svelte-check
    
  • Before execution, verify that the package is present in the lockfile and was obtained from an approved registry.
  • If installation is necessary, pin an exact reviewed version rather than resolving the latest release:
    bash
    npm install --save-dev --save-exact svelte-check@<reviewed-version>
    
  • Use lockfile integrity verification, a trusted registry, dependency scanning, and restricted execution environments.
  • Run auditing tools with minimal filesystem and network permissions and without access to unrelated credentials or secrets.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (1)

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.