Back to skill

Security audit

Zod Testing

Security checks for vulnerabilities and agentic risk

Overview

This is a visible documentation-only skill for Zod schema testing, with install and dependency commands that users should review and pin before running.

Before installing, prefer pinned versions or an immutable commit and consider a project-local install instead of the documented global command. If using the dependency and CI examples, review packages first, commit lockfiles, and keep generated snapshots and git-diff checks limited to the intended project paths.

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
README.md:15
Finding
Unpinned Third-Party Packages and Mutable Repository Sources<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:15-25` - `references/api-reference.md:188` - `references/api-reference.md:225` - `references/api-reference.md:335` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code `README.md:15-25`: ```markdown ## Install ```bash npx skills add anivar/zod-testing -g ``` Or with full URL: ```bash npx skills add https://github.com/anivar/zod-testing ``` ``` `references/api-reference.md:188`: ```bash npm install -D zod-schema-faker ``` `references/api-reference.md:225`: ```bash npm install -D @anatine/zod-mock @faker-js/faker ``` `references/api-reference.md:335`: ```bash npm install -D fast-check ``` ### Technical Analysis The documented installation commands resolve mutable third-party package or repository state without exact versions, commit hashes, or integrity constraints. The `npx skills add` command may download and execute the currently resolved version of the `skills` package. The GitHub installation form references a mutable repository rather than an audited commit. Similarly, the `npm install` examples install versions selected by npm at execution time. Depending on package configuration, installation can execute lifecycle scripts such as `preinstall`, `install`, or `postinstall`. The global `-g` option increases the scope and persistence of the installed Skill relative to a project-local installation. Although the audited project does not itself contain a malicious payload, these instructions create a supply-chain execution path whose effective code can change after this audit. ### Attack Path 1. An attacker compromises a referenced npm package, its maintainer account, the package registry, or the referenced GitHub repository. 2. The attacker publishes a malicious package version or modifies the repository's mutable default branch. 3. A user or AI agent follows one of the documented unpinned installation commands. 4. npm or ...[truncated 1108 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin command-line tools and npm dependencies to exact reviewed versions: ```bash npx skills@REVIEWED_VERSION add anivar/zod-testing -g npm install -D zod-schema-faker@REVIEWED_VERSION npm install -D @anatine/zod-mock@REVIEWED_VERSION @faker-js/faker@REVIEWED_VERSION npm install -D fast-check@REVIEWED_VERSION ``` 2. Pin GitHub installations to a reviewed immutable commit SHA rather than a branch or default repository revision. 3. Prefer project-local installation over global installation unless global scope is necessary. 4. Commit and review the generated lockfile. Use `npm ci` in automated environments so dependency resolution follows the reviewed lockfile. 5. Verify package provenance, integrity metadata, publisher identity, and release history before installation. 6. Run dependency installation in a sandbox or least-privileged environment without unnecessary credentials or sensitive environment variables. 7. Where operationally possible, disable dependency lifecycle scripts during initial inspection: ```bash npm install --ignore-scripts ``` Enable required scripts only after reviewing their contents. 8. Add automated dependency auditing and controlled update workflows so newly published versions are reviewed before adoption. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The README instructs users to run `npx skills add anivar/zod-testing -g` without pinning the package/tool version. Because `npx` resolves and executes code from the registry at install time, users may receive a newer or compromised release than the author originally tested, which creates a supply-chain risk even though the content here appears to be ordinary documentation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The full-URL install example still relies on `npx skills add` without a pinned version for the `skills` tool and does not pin the GitHub repository to an immutable commit. That means execution and fetched content can drift over time or be replaced if the upstream package or repository is compromised.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
This ecosystem entry advertises `npx skills add anivar/jest-skill -g`, which again executes an unpinned installer path. Even in a README link table, this normalizes running remote code without version constraints, exposing users to supply-chain compromise or unexpected behavior from future releases.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The `msw-skill` install command uses `npx skills add` without version pinning, so users may execute whatever package version is current at install time. This is a common but real documentation-driven supply-chain risk, especially because readers may copy-paste the command directly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The `redux-saga-testing` entry repeats the same unpinned `npx skills add` pattern. Since `npx` can download and run packages dynamically, users are exposed to any malicious or breaking changes introduced upstream after the README was published.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The `zod-skill` ecosystem command is another unpinned `npx` installation example, carrying the same risk of executing altered or compromised upstream code. The surrounding context is a developer skill README, so copy-paste execution by users is plausible and increases practical exposure.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The `redux-saga-skill` install line documents execution through an unversioned `npx skills` command. While likely included for convenience rather than abuse, it still creates a supply-chain exposure because the exact code executed is not fixed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
The `contributor-codebase-analyzer` entry also uses an unpinned `npx skills add` command, which can fetch and execute changing remote content. In this skill-distribution context, the issue is more dangerous than a passive reference because the README directly instructs execution of a remote installer.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill introduces `child_process.execSync` to run a shell `grep` command as part of testing guidance, which expands the skill from schema testing into arbitrary command execution. Even though the command string is static in the example, normalizing shell execution in docs increases the chance that users adapt it with variable input or run it in sensitive CI environments, creating command-injection and environment-abuse risk.

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.

Vague Triggers

Low
Confidence
88% confidence
Finding
The manifest says the skill triggers on 'test files for Zod schemas' and 'schema testing patterns,' which are not tightly bounded and do not include exclusion conditions or negative examples. Those phrases could cause unintended invocation in broadly relevant testing contexts beyond the intended scope.

Context-Inappropriate Capability

Low
Confidence
78% confidence
Finding
The manifest emphasizes Zod testing patterns, including snapshot testing with toJSONSchema(), but this section expands into filesystem mutation and CI git-diff workflow automation. While related, exporting files and enforcing CI repository state are broader operational capabilities not clearly justified by the stated purpose of a testing-pattern skill.

Static analysis

No suspicious patterns detected.