Back to skill

Security audit

DESIGN.md Design System Validator

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward guide for using a DESIGN.md CLI, with the main caution that its npm commands are unpinned and should be run deliberately.

Before installing, prefer a pinned @google/design.md version in a project-local package.json with a lockfile instead of global npm install or unversioned npx. Run the commands only in projects where you are comfortable allowing that npm package to read design files and write generated token outputs.

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

Unpinned npm Package Installation and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14–17
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Medium

Vulnerable Code

markdown
## Installation

The skill uses `@google/design.md` npm package:
```bash
npm install -g @google/design.md
text

The unpinned package is subsequently invoked through `npx` at lines 23, 36–37, 42–43, and 59–65. Representative execution instructions include:

```bash
npx @google/design.md lint DESIGN.md
npx @google/design.md diff DESIGN.md DESIGN-v2.md
npx @google/design.md export --format tailwind DESIGN.md > tailwind.theme.json
npx @google/design.md export --format dtcg DESIGN.md > tokens.json
npx @google/design.md spec
npx @google/design.md spec --rules

Technical Analysis

The Skill instructs users or agents to globally install and execute @google/design.md without an exact version, lockfile, or integrity verification. Package resolution can therefore select a release published after this Skill was audited. The reviewed project contains no package manifest, lockfile, checksum, or vendored source that establishes which implementation will execute.

A global npm installation can run package lifecycle scripts and changes the user's global npm environment. The repeated unversioned npx commands may also resolve or retrieve package code according to the local npm configuration and installed package state. Consequently, compromise of the package, its transitive dependency chain, or the configured registry could turn these legitimate-looking instructions into arbitrary local code execution.

This finding establishes unsafe supply-chain exposure; it does not establish that the named package is currently malicious.

Attack Path

  1. An attacker compromises a future release of @google/design.md, one of its transitive dependencies, or a registry used by the target.
  2. The malicious package is published under a version satisfying the unpinned resolution.
  3. A user o ...[truncated 939 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin @google/design.md to a reviewed exact version rather than relying on mutable package resolution.
  2. Declare it as a project-local dependency and commit the corresponding package manifest and lockfile.
  3. Use a deterministic installation command such as npm ci in a controlled environment.
  4. Verify registry provenance and package integrity before execution.
  5. Avoid global installation; invoke the pinned project-local binary instead.
  6. Disable npm lifecycle scripts during installation with --ignore-scripts where package functionality permits, or explicitly audit every required lifecycle script.
  7. Review and pin relevant transitive dependencies through the lockfile.
  8. Perform dependency execution in a restricted environment with only the filesystem, credentials, and network access required for design-file processing.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (9)

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Using npx @google/design.md without an explicit version causes the tool to fetch and execute whatever package version is current at runtime. This creates a supply-chain risk: a compromised upstream release, dependency hijack, or unexpected breaking update could execute unreviewed code on the user's machine during normal skill use.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This npx invocation executes an unpinned package version, so the exact code run depends on the current npm registry state at execution time. If the package or one of its fetched dependencies is compromised, users following the skill could run attacker-controlled code.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The export command relies on npx to resolve the latest available package version unless otherwise pinned. That makes execution nondeterministic and exposes users to supply-chain compromise or accidental execution of newly published code that has not been vetted.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This command also executes an unversioned package via npx, which can pull newer or maliciously altered code at the moment the user runs it. Because exported artifacts may be generated in automated workflows, this broadens the blast radius if the dependency chain is compromised.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Even for the spec subcommand, npx @google/design.md may download and execute the latest package version at runtime. Any such dynamic execution from the registry introduces avoidable supply-chain exposure, regardless of the apparent harmlessness of the subcommand.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

This command repeats the same unpinned npx pattern, making the executed code dependent on external registry state instead of a reviewed artifact. An attacker controlling a release or dependency could abuse this path to execute arbitrary code under the user's account.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

In the 'Usage in Coding' section, the skill instructs users to run an unpinned npx command against project files. Because this is framed as a routine workflow step, it materially increases the chance of repeated execution of unreviewed package code in developer environments.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This workflow example uses npx with no version pin, so every run may resolve different code from the registry. In an agent skill context, repeating such commands across projects amplifies supply-chain and integrity risks because users are encouraged to trust the documented command sequence.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The final export example again executes an unpinned package fetched at runtime, allowing arbitrary upstream changes to affect local code execution and generated artifacts. In a design-system workflow, that could lead to both code execution risk and silent tampering of produced configuration files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.