Skip to main content
SkillTotal

Is shadcn-ui/ui safe?

What shadcn-ui/ui does

shadcn/ui is a set of accessible, customizable components plus a CLI that copies their source code into your project. Its documentation describes it as a way to build your own component library. The shadcn CLI's init command installs dependencies, adds a cn utility and configures CSS variables, and add brings in components by name, URL or local path, using an optional components.json file that describes your Tailwind CSS setup. An MCP server, set up with shadcn mcp init, lets AI assistants browse, search and install registry items. The code lives in the shadcn-ui/ui repository under the MIT license. Before installing, review components added from third-party registry URLs, since they become source code in your project.

No malicious indicators - review capabilities before installing
Notable — review in context (a capability is not a malicious indicator):
  • Node.js shell/command execution
  • npm install-time lifecycle hook
  • MCP server launches a host command

What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.

shadcn-ui/ui is a GitHub repository analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: filesystem read, filesystem write, install time execution, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).

ui 0.0.1

GitHub repository, read as an npm package · https://github.com/shadcn-ui/ui
LOW
0
/ 100 risk score
Snapshot · scanned Nov 21, 2026 · ui@0.0.1 · engine 1.8.0 / ruleset 107

Get notified when this component changes

Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of shadcn-ui/ui's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
filesystem readfilesystem writeinstall time executionmcp tools detectednetwork egressshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Tool surface
Tool Usage
Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication
Supply-chain provenance risk
General Protections / Supply Chain

Findings (7)

Capabilitynpm install-time lifecycle hooknot scored · severity highST-INSTALL-NPM

package.json runs scripts automatically when the package is installed.

"postinstall": "fumadocs-mdx"

Why it matters: Install scripts are a favorite supply-chain foothold — they execute on every machine that installs the package.

Fix: Inspect the hook command. Install-time scripts are a common supply chain execution vector; ensure they do nothing beyond a documented build step.

CapabilityMCP server launches a host commandnot scored · severity highST-MCP-SERVER-EXEC

An MCP server entry launches a command on your host.

Why it matters: Trusting the manifest means running that binary — verify what it is and where it comes from.

Fix: Verify the launched command and its source before trusting this MCP server configuration.

CapabilityNode.js shell/command executionnot scored · severity highST-SHELL-NODE

The component can run operating-system commands or spawn processes.

import { execFileSync } from "node:child_process"
import { execSync } from "child_process"
execSync("npx changeset version", { stdio: "inherit" })
execSync("pnpm install --lockfile-only", { stdio: "inherit" })
import { execFileSync } from "node:child_process"
import { execFileSync } from "node:child_process"
import { exec } from "child_process"
exec("git rev-parse --short HEAD", (err, stdout) => {
import { spawn, type ChildProcess } from "node:child_process"
const child: ChildProcess = spawn(
import { execFileSync } from "node:child_process"
import { execa } from "execa"

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.

CapabilityNode.js filesystem readnot scored · severity mediumST-FS-NODE-READ

The component reads files from disk.

const pkg = JSON.parse(fs.readFileSync(pkgJsonPath))
const content = fs.readFileSync(filePath, "utf-8")
let source = fs.readFileSync(/* turbopackIgnore: true */ src, "utf8")
return fs.readFile(/* turbopackIgnore: true */ absolutePath, "utf-8")
let code = await fs.readFile(file.path, "utf-8")
const raw = fs.readFileSync(path.join(process.cwd(), src), "utf8")
const content = fs.readFileSync(file, "utf-8")
fs.readFileSync(filepath, "utf-8") === content
const legacy: IconMapping = JSON.parse(fs.readFileSync(legacyPath, "utf-8"))
fs.readFileSync(outputPath, "utf-8") === content
const content = await fs.readFile(pnpmWorkspacePath, "utf8")
const appConfigContents = await fs.readFile(
const contents = await fs.readFile(path.resolve(cwd, file), "utf8")
const contents = await fs.readFile(filePath, "utf8")
const content = await fs.readFile(resolvedPath, "utf8")
return await fs.readFile(sourcePath, "utf-8")
return await fs.readFile(registryFile, "utf-8")
const content = await fs.readFile(resolvedFilePath, "utf-8")
content = await fs.readFile(registryFile, "utf-8")
await fs.readFile(sourcePath, "utf-8")
const raw = await fs.readFile(cssFilepath, "utf8")
let output = await fs.readFile(cssFilepath, "utf8")
const existingContent = await fs.readFile(envFilePath, "utf-8")
const existingFileContent = await fs.readFile(filePath, "utf-8")
const existingFileContent = await fs.readFile(filePath, "utf-8")

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

CapabilityNode.js filesystem write/deletenot scored · severity mediumST-FS-NODE-WRITE

The component writes or deletes files on disk.

fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n")
fs.writeFile(path.join(temporaryDirectory, "app/globals.css"), ""),
await fs.rm(temporaryDirectory, { recursive: true, force: true })
fs.writeFileSync(filepath, content)
fs.writeFileSync(outputPath, content)
await fs.writeFile(cssFilepath, output, "utf8")
await fs.writeFile(cssFilepath, output, "utf8")
await fs.writeFile(envFilePath, mergedContent, "utf-8")
await fs.writeFile(envFilePath, newEnvContent + "\n", "utf-8")
await fs.writeFile(filePath, mergedContent, "utf-8")
await fs.writeFile(filePath, content, "utf-8")
await fs.writeFile(resolvedPath, rewrittenContent, "utf-8")
await fs.writeFile(layoutPath, updatedContent, "utf-8")
await fs.writeFile(config.resolvedPaths.tailwindConfig, output, "utf8")
fs.writeFileSync(snapshotPath, `${JSON.stringify(result, null, 2)}\n`)
await fs.writeFile(cssFilepath, cssContent, "utf8")
await fs.writeFile(targetPath, `${JSON.stringify(config, null, 2)}\n`, "utf8")
await fs.writeFile(outputPath, JSON.stringify(result.data, null, 2))
await fs.writeFile(file, result.content)

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

CapabilityNode.js network egressnot scored · severity mediumST-NET-NODE

The component makes outbound network requests.

const data = await fetch("https://api.github.com/repos/shadcn-ui/ui", {
const response = await fetch(url, { signal: AbortSignal.timeout(5000) })
import { lookup } from "node:dns/promises"

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

CapabilityMCP tool surface detectednot scored · severity lowST-MCP-DETECTED

An MCP tool surface (manifest or tool definitions) was found.

Why it matters: Just context — review which tools it offers and their permissions.

Fix: Review the declared MCP tools and their permissions.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in shadcn-ui/ui.

Maintain shadcn-ui/ui?

Check the next package before your agent installs it

The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →