Back to skill

Security audit

Tailwind CSS

Security checks for vulnerabilities and agentic risk

Overview

This Tailwind CSS skill is coherent documentation and setup guidance, with visible npm/npx supply-chain caution but no hidden or purpose-mismatched behavior.

Before using the setup or migration snippets, prefer exact package versions or locally installed lockfile-resolved tools, run migration commands on a clean branch, and review every diff. Expect the skill to read and update its disclosed Tailwind preference files under ~/Clawic/data/tailwindcss/ when you state preferences.

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
installation.md:26
Finding
Unpinned npm and npx Package Execution## Vulnerability Details **File Location**: `installation.md:26-27, 51-53, 62-64`; `v4-migration.md:7-9` **Vulnerability Type**: Unpinned third-party package installation and execution **Risk Level**: Medium ### Vulnerable Code `installation.md:26-27`: ```bash npm install tailwindcss @tailwindcss/vite # or @tailwindcss/postcss / @tailwindcss/cli ``` `installation.md:51-53`: ```bash # CLI route only npx @tailwindcss/cli -i ./src/app.css -o ./dist/app.css --watch --minify ``` `installation.md:62-64`: ```bash npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p ``` `v4-migration.md:7-9`: ```bash git switch -c tailwind-v4 # clean branch, nothing uncommitted npx @tailwindcss/upgrade ``` ### Technical Analysis These instructions install or execute npm packages without pinning exact, reviewed versions. An unqualified `npx` invocation may download and execute the version currently resolved from the configured package registry when a suitable local package is unavailable. Package installation can also execute lifecycle scripts from the selected package or its dependency tree. The package names are consistent with the Skill's declared Tailwind CSS purpose, and the audit found no evidence of typosquatting or intentional malicious behavior. Nevertheless, the commands create a mutable supply-chain execution boundary: the code that runs can differ from the code available when this Skill was reviewed. The upgrade utility is especially sensitive because it is intentionally allowed to rewrite files throughout the repository. ### Attack Path 1. An attacker compromises a referenced npm package, a maintainer account, a transitive dependency, or the package registry resolution path. 2. The attacker publishes a malicious version or injects malicious package lifecycle or CLI behavior. 3. A user follows the Skill's unpinned `npm install` or `npx` instruction. 4. npm resolves a ...[truncated 1069 chars]
Remediation
## Remediation Suggestions 1. Pin every executable package to an exact reviewed version, for example: ```bash npm install --save-dev --save-exact tailwindcss@4.x.y @tailwindcss/vite@4.x.y npm install --save-dev --save-exact @tailwindcss/cli@4.x.y npm install --save-dev --save-exact @tailwindcss/upgrade@4.x.y ``` 2. Replace remotely resolved `npx` execution with a lockfile-resolved local binary: ```bash npm exec --offline -- @tailwindcss/upgrade ``` Run this only after installing the pinned package and verifying that the selected npm version supports the intended offline behavior. 3. Commit `package-lock.json` and use `npm ci` in CI and other controlled environments to enforce reproducible dependency resolution. 4. Verify package provenance, integrity, publisher identity, and release history before installation. Apply organizational registry allowlists where available. 5. Run migration tools on a clean, isolated branch with no unrelated uncommitted files. Review every resulting change before commit, as the existing migration guide already recommends. 6. Execute package installation and codemods in a restricted environment without unnecessary credentials, secrets, or broad filesystem access. 7. Disable npm lifecycle scripts where they are not required, while first confirming that doing so will not break the reviewed installation workflow: ```bash npm ci --ignore-scripts ``` 8. Update both `installation.md` and `v4-migration.md` so all examples consistently use exact versions and locally installed tools.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (7)

Hidden Instructions

High
Category
Prompt Injection
Content
last: YYYY-MM-DD

## Context
<!-- Major and integration, framework, monorepo or single app -->
<!-- Design system in play: own tokens, a UI kit, an imported token pipeline -->

## Pain Points
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
| `**:` | `& *` | All descendants (v4); expensive on large subtrees |

```html
<!-- Named groups when they nest, or the inner group hijacks the outer -->
<li class="group/row">
  <div class="group/actions">
    <button class="opacity-0 group-hover/row:opacity-100 group-hover/actions:text-brand-500">…</button>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

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
84% confidence
Finding
The documentation tells users to execute `npx @tailwindcss/cli` without pinning a version, which causes npm to resolve and run whatever package version is current at execution time. Because `npx` executes package code, this creates a supply-chain risk: a malicious or compromised newly-published version could run in the user's environment, and the exact build behavior is also non-reproducible.

Rp1

Medium
Category
MCP Rug Pull
Confidence
82% confidence
Finding
The setup step `npx tailwindcss init -p` runs an unpinned package from the registry, so the command may execute different code over time and could expose users to a compromised package release. In installation guidance, this is especially risky because it normalizes direct execution of remote package code during project bootstrap.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The documentation instructs users to run `npx @tailwindcss/upgrade` without pinning a specific version. Because `npx` fetches the latest package at execution time, users may run unreviewed or newly compromised code, creating a supply-chain execution risk on the developer machine. In a migration skill, this is more dangerous because the command is presented as the first recommended step and is likely to be copied verbatim.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
Line L46 states that `text_direction` other than `ltr` changes emitted examples, implying `ltr` is the default presentation. This is a natural-language locale/direction policy choice presented as a default without offering user choice or documenting a region-specific justification.

Static analysis

No suspicious patterns detected.