Back to skill

Security audit

Netlify Deploy

Security checks for vulnerabilities and agentic risk

Overview

This Netlify deployment skill is coherent, but needs review because it runs an unpinned CLI during login/deploy workflows and includes secret-handling commands with limited safeguards.

Review before installing. Prefer a pinned, trusted Netlify CLI version or a lockfile-managed local dependency, keep production deploys behind explicit approval, and do not import `.env` wholesale unless the variables have been reviewed for secrets and intended Netlify exposure.

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:43
Finding
Unpinned npm Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:43-67`; `setup.md:23-27`; `cli-commands.md:4-59`; `deployment-patterns.md:7-51`; `netlify-toml.md:59` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:43-67`: ```bash npx netlify status ``` ```bash git remote get-url origin npx netlify link --git-remote-url <remote-url> ``` ```bash npx netlify deploy ``` ```bash npx netlify deploy --prod ``` ```bash npm run build npx netlify deploy --dir=dist ``` `setup.md:23-27`: ```text 1. `npx netlify status` 2. `git remote get-url origin` (if repo exists) 3. `npx netlify link --git-remote-url <remote>` or `npx netlify init` 4. `npx netlify deploy` (preview first) ``` `cli-commands.md:4-59`: ```bash npx netlify login npx netlify status npx netlify logout ``` ```bash npx netlify link npx netlify link --git-remote-url <url> npx netlify init npx netlify unlink ``` ```bash npx netlify deploy npx netlify deploy --prod npx netlify deploy --dir=dist npx netlify deploy --message="release note" npx netlify deploy:list ``` ```bash npx netlify env:list npx netlify env:set KEY value npx netlify env:get KEY npx netlify env:import .env ``` ```bash npx netlify build npx netlify build --dry ``` ```bash npx netlify --version npx netlify status --verbose npx netlify help deploy ``` ```bash npx netlify open npx netlify open:admin npx netlify open:site ``` `deployment-patterns.md:7-51` includes the same unversioned execution pattern: ```text Authenticated? |- No -> npx netlify login `- Yes -> Linked? |- No -> Try link by git remote | |- Success -> preview deploy | `- Fail -> npx netlify init `- Yes -> deploy mode? |- Preview -> npx netlify deploy `- Production -> npx netlify deploy --prod ``` `netlify-toml.md:59`: ```bash npx netlify build --dry ``` ### Technical Analysis The Skill consistently invokes `npx netlify` without specifying an exact package name ...[truncated 2514 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace ambiguous, unversioned execution with the verified official npm package and an exact audited version: ```bash npx --yes netlify-cli@<audited-version> status npx --yes netlify-cli@<audited-version> deploy ``` 2. Prefer installing the CLI as a pinned development dependency: ```bash npm install --save-dev --save-exact netlify-cli@<audited-version> ``` Then invoke the lockfile-controlled binary: ```bash npm exec -- netlify status npm exec -- netlify deploy ``` 3. Commit and enforce the package lockfile. Use reproducible installation commands such as `npm ci` rather than allowing implicit dependency updates. 4. Verify the selected package name, publisher, registry source, and integrity metadata before documenting or executing it. 5. Configure an approved npm registry explicitly in controlled environments and prevent unexpected project or user-level npm configuration from redirecting package resolution to an untrusted registry. 6. Update every occurrence in `SKILL.md`, `setup.md`, `cli-commands.md`, `deployment-patterns.md`, and `netlify-toml.md` so that no fallback workflow reintroduces unpinned `npx netlify` execution. 7. Review and deliberately upgrade the pinned version on a controlled schedule. Test authentication, build, environment-variable, and deployment operations before approving a new version. ]]>
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (54)

Credential Access

High
Category
Privilege Escalation
Content
npx netlify env:list
npx netlify env:set KEY value
npx netlify env:get KEY
npx netlify env:import .env
```

## Build and Validation
Confidence
90% confidence
Finding
The documented `.env` import operation directly handles a file commonly containing credentials, API keys, and other secrets. In this skill context, presenting that command without safeguards or warnings increases the risk of secret ingestion from insecure local files, accidental propagation to remote environments, or exfiltration if combined with the unpinned `npx` execution path.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The manifest metadata declares a dependency on `npx` and the skill is built around executing `npx netlify`, but no version constraint is expressed anywhere in the skill package. That signals nondeterministic runtime behavior and increases the chance that users will execute an unreviewed latest CLI version as part of normal skill operation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The skill repeatedly instructs use of `npx netlify` without pinning a package version, which means execution may fetch and run whatever version is current at invocation time. In a deployment skill, that creates a real supply-chain and reproducibility risk: a compromised or breaking upstream release could execute code in the operator's environment and affect deployment behavior.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
Using `npx netlify status` without a version pin can cause `npx` to download and execute an unreviewed latest package version. Even though this is a status command, it still executes package code locally and may expose tokens, environment data, or workstation integrity if the upstream package or dependency chain is compromised.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
`npx netlify login` without version pinning executes mutable remote package contents during an authentication flow. That increases risk because the command handles browser/OAuth login and may process credentials or tokens, making a compromised or malicious release especially sensitive in this context.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The unpinned `npx netlify link --git-remote-url <remote-url>` command can fetch and run a changed upstream package with access to repository metadata and local environment state. Because linking associates a repo to a deployment target, compromise here could misroute deployments or harvest configuration details.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The fallback instruction to run `npx netlify init` without version pinning has the same mutable-code execution risk as other `npx` uses, but here it may also create or modify deployment configuration. In a compromised-release scenario, initialization behavior could be altered to introduce unsafe settings or persistence into project config.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The default preview deploy command `npx netlify deploy` is unpinned, so every deploy may execute whatever latest CLI code is published at that time. Since deploy commands package and transmit build artifacts, the context makes the issue more dangerous by coupling code execution with access to potentially sensitive project contents.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
`npx netlify deploy --prod` without version pinning is a real vulnerability because it executes mutable remote package code during a production release path. The production context increases impact: a compromised or unexpected CLI version could alter what is deployed, expose artifacts, or disrupt live service availability.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The instruction `npx netlify deploy --dir=dist` is unpinned and therefore subject to runtime package drift. While functionally similar to other deploy invocations, this path still executes remote-resolved code with access to local build outputs and deployment credentials, making it a meaningful supply-chain risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The trap guidance tells users to run `npx netlify status` first, but still leaves the command unpinned, preserving the same supply-chain risk despite the safety framing. The surrounding context makes this more likely to be copied as a canonical workflow step, increasing exposure across repeated uses.

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
90% confidence
Finding
The documentation instructs users to run `npx netlify` without pinning a specific package version. Because `npx` may fetch the latest package at execution time, users can be exposed to unexpected or malicious upstream changes, creating a supply-chain risk in a skill meant to be executed directly from copied commands.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The command uses unpinned `npx netlify`, which can resolve to the latest available package at runtime. In documentation that users may follow verbatim, this introduces avoidable supply-chain exposure if the package or one of its transitive dependencies is compromised.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Using `npx netlify` without a fixed version allows execution of whatever package version is current when the user runs the command. That makes the skill less reproducible and increases the risk of executing compromised or behaviorally changed code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This line documents execution of an unpinned package via `npx`, which can download and run newly published code. For a deployment-oriented skill, that creates a real supply-chain risk because the command is likely to be copied directly by users with access to production resources.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The command invokes `npx netlify` without version pinning, so the exact code executed is not controlled by the skill. If the package or dependencies change unexpectedly, users could execute unreviewed code while linking infrastructure-related resources.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
An unpinned `npx` command can fetch arbitrary newer releases at runtime, reducing reproducibility and increasing supply-chain exposure. Because this command initializes site configuration, compromised execution could affect repository and deployment setup.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This documented `npx netlify` invocation does not constrain the package version, so future executions may run different code than originally reviewed. In a CLI skill that manages remote site linkage, that is a legitimate security concern rather than a mere style issue.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The production deployment command is documented without any warning that it can affect live user-facing infrastructure. This omission makes accidental production changes more likely, especially in an agent skill where users may execute commands verbatim without recognizing the operational blast radius.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The deployment command uses `npx netlify` without version pinning, exposing users to runtime package substitution or unexpected updates. Since deployment commands often run with credentials and can alter hosted content, supply-chain compromise here has meaningful impact.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The documented production deployment command is both unpinned and capable of affecting live infrastructure. If `npx` resolves a compromised or unexpected package version, an attacker could potentially influence production deployment behavior or harvest deployment credentials.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The command runs the Netlify CLI through `npx` without constraining the version, which introduces a supply-chain and reproducibility risk. Even seemingly simple directory deploys may execute with authenticated access to a Netlify account.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This deploy command is unpinned and may execute whatever CLI version is current at runtime. Because deploy messages accompany remote deployment operations, the broader command still carries supply-chain risk due to account and infrastructure access.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
`npx netlify deploy:list` is documented without version pinning, which can result in unreviewed code execution. Listing deployments may seem read-only, but it still commonly requires authenticated access and can expose environment or account metadata if a package is compromised.

Static analysis

No suspicious patterns detected.