Back to skill

Security audit

Typescript Mastery

Security checks for vulnerabilities and agentic risk

Overview

This is a TypeScript guidance skill with ordinary, disclosed developer setup commands and no hidden or destructive behavior.

Before following the setup commands, use a trusted npm registry and consider pinning exact package versions or using a reviewed lockfile. The skill itself is educational Markdown and does not request sensitive access or persistent control.

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:210
Finding
Unpinned npm Dependencies and Executable Resolution## Vulnerability Details **File Location**: `SKILL.md`, lines 210-211 **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ```text - `npm install -D typescript ts-node @types/node` - `npx tsc --init` -- generate tsconfig.json ``` ### Technical Analysis The documented installation command does not pin dependency versions or require a reviewed lockfile. Consequently, npm resolves mutable package versions from the user's configured registry at installation time. Package installation may also execute lifecycle scripts with the invoking user's permissions. The subsequent `npx tsc --init` command executes the locally resolved TypeScript binary. If package resolution is redirected to an untrusted registry, or if a referenced package or its dependency chain is compromised, following these instructions could install and execute attacker-controlled code. No malicious package, registry, or payload is embedded in the audited file. Exploitation therefore depends on an external supply-chain compromise or unsafe npm configuration. ### Attack Path 1. An attacker compromises a referenced npm package, one of its transitive dependencies, or the registry used by the victim. 2. A user follows the skill's unpinned `npm install` instruction. 3. npm resolves and downloads the attacker-controlled package version. 4. Malicious package lifecycle code may execute during installation. 5. The user runs `npx tsc --init`, which may execute a compromised locally installed binary. 6. The payload operates with the permissions of the user who invoked npm and may access resources available to that account. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the invoking user's privileges. Depending on the execution environment, this may expose source code, environment variables, developer credentials, package registry tokens, SSH material, and files writable by that user. It could also permit ...[truncated 215 chars]
Remediation
## Remediation Suggestions - Pin all direct dependencies to reviewed, exact versions rather than relying on mutable latest releases. - Generate, review, and commit a package lockfile, then use `npm ci` for reproducible installation. - Configure and verify the expected trusted npm registry before installation. - Use lockfile integrity metadata and automated dependency scanning to detect tampering and known vulnerabilities. - Avoid ambiguous executable resolution. Invoke a verified, lockfile-installed binary through a controlled project script. - Where package compatibility permits, install dependencies with lifecycle scripts disabled and explicitly review any packages that require installation scripts. - Periodically update pinned versions through a controlled review process rather than resolving new versions implicitly during skill use.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

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.

Static analysis

No suspicious patterns detected.