Back to skill

Security audit

Monorepo Management

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent monorepo guide, but it includes high-impact deploy and package-publishing examples with weak safeguards.

Install only if you want monorepo setup and CI/CD guidance, and treat deploy or publish snippets as templates requiring review. Pin npx tools and GitHub Actions to reviewed versions or commits, restrict workflow permissions, prefer OIDC/trusted publishing over long-lived npm tokens, and add manual approval gates before production deploys or package publication.

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 (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:59
Finding
Unpinned Turborepo Scaffolding Package Is Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md:59-62` **Vulnerability Type**: Unpinned remote package execution **Risk Level**: Medium ```bash # Create new monorepo npx create-turbo@latest my-monorepo cd my-monorepo ``` ### Technical Analysis The documented command uses `npx` to download and immediately execute `create-turbo` through the mutable `latest` distribution tag. The effective code can therefore change after the Skill has been reviewed. This behavior supports the declared monorepo setup functionality, but using a mutable version exceeds the minimum supply-chain trust required. A compromised package publisher, registry account, or newly malicious release could cause arbitrary package lifecycle or scaffolding code to run under the invoking user's account. ### Attack Path 1. An attacker compromises the package publisher, package registry entry, or release process for `create-turbo`. 2. The attacker publishes a malicious release and assigns it to the `latest` tag. 3. A user follows the Skill and runs `npx create-turbo@latest my-monorepo`. 4. `npx` downloads and executes the attacker-controlled release. 5. The malicious process can access files, environment variables, credentials, and network resources available to the invoking user. ### Impact Assessment Successful exploitation permits arbitrary code execution with the privileges of the user running the command. The accessible scope can include the current workspace, user-owned files, developer credentials, package registry configuration, SSH material, and environment variables. No evidence indicates that the Skill itself intentionally supplies a malicious package.
Remediation
## Remediation Suggestions - Replace `@latest` with a reviewed exact version, such as `create-turbo@X.Y.Z`. - Review release provenance, package ownership, and integrity before updating the pinned version. - Run scaffolding tools in an isolated environment without production credentials. - Prefer package-manager controls that validate signatures, provenance, or integrity metadata. - Document a controlled update process that requires review before changing the pinned version.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:235
Finding
Unpinned Nx Scaffolding Package Is Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md:235-238` **Vulnerability Type**: Unpinned remote package execution **Risk Level**: Medium ```bash # Create Nx monorepo npx create-nx-workspace@latest my-org ``` ### Technical Analysis The command downloads and executes `create-nx-workspace` using the mutable `latest` tag. Consequently, the code executed by a user is not fixed to the version that was available when the Skill was audited. Although downloading an Nx scaffolding utility is relevant to the declared functionality, automatic execution of an unreviewed future release creates an avoidable supply-chain boundary. Package installation scripts and the scaffolding process execute with the user's local permissions. ### Attack Path 1. An attacker compromises the package publisher, registry account, or release pipeline for `create-nx-workspace`. 2. A malicious package version is published under the `latest` tag. 3. A user executes the command recommended by the Skill. 4. `npx` retrieves and runs the malicious version without requiring the Skill itself to change. 5. The malicious process performs actions allowed by the user's local account, potentially including file access and outbound network communication. ### Impact Assessment Exploitation can result in arbitrary local code execution under the invoking user's identity. The process may access the repository, user-writable files, environment variables, development tokens, and other credentials available in the execution environment. The audit found no evidence that the current Skill intentionally directs users to a known malicious package.
Remediation
## Remediation Suggestions - Pin `create-nx-workspace` to an exact reviewed version instead of `@latest`. - Validate package provenance, maintainers, and integrity before approving upgrades. - Execute scaffolding in a disposable container or restricted development environment. - Remove unrelated credentials from the environment before running third-party setup tools. - Require explicit review for every pinned-version update.

T08 · Insecure Dependencies

Error
Location
SKILL.md:607
Finding
Mutable Third-Party CI Action Receives Repository and Publishing Tokens## Vulnerability Details **File Location**: `SKILL.md:607-613` **Vulnerability Type**: Credential-bearing mutable CI dependency **Risk Level**: High ```yaml # .github/workflows/release.yml - name: Create Release Pull Request or Publish uses: changesets/action@v1 with: publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} ``` ### Technical Analysis The workflow references `changesets/action@v1`, which is a mutable major-version tag, and supplies that action with GitHub and npm credentials. Token access is functionally related to the documented release process, and the inspected Skill does not directly transmit either token to an unknown endpoint. However, the action is not pinned to an immutable reviewed commit. GitHub Actions code runs inside the workflow environment and can read environment variables supplied to its step. If the action repository, release process, or mutable tag were compromised, substituted action code could access both tokens. The resulting exposure depends on the permissions assigned to `GITHUB_TOKEN` and `NPM_TOKEN`. ### Attack Path 1. An attacker compromises the action repository, a maintainer account, or the mutable `v1` tag. 2. The attacker changes the tag to reference malicious action code. 3. The release workflow starts and resolves `changesets/action@v1` to the compromised revision. 4. GitHub Actions injects `GITHUB_TOKEN` and `NPM_TOKEN` into the action's environment. 5. The malicious action reads the tokens and can transmit or misuse them. 6. The attacker uses the available permissions to modify repository resources, create unauthorized releases, or publish compromised npm packages. ### Impact Assessment Potential impact includes exposure of repository automation credentials, unauthorized repository changes or releases, and malicious npm publication. The exact scope is bounded by token permissions, package o ...[truncated 159 chars]
Remediation
## Remediation Suggestions - Pin `changesets/action` to a reviewed full commit SHA rather than the mutable `v1` tag. - Configure explicit, minimal workflow `permissions` for `GITHUB_TOKEN`. - Replace long-lived npm tokens with npm trusted publishing through OIDC where supported. - Protect the publishing job with a restricted GitHub environment and required approval. - Prevent release workflows from executing untrusted pull-request code with publishing secrets. - Regularly review the pinned action revision and update it through a controlled dependency-review process. - Restrict the npm identity to only the packages that the workflow must publish.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Chaining Abuse

High
Category
Tool Misuse
Content
"test": "turbo run test",
    "lint": "turbo run lint",
    "format": "prettier --write \"**/*.{ts,tsx,md}\"",
    "clean": "turbo run clean && rm -rf node_modules"
  },
  "devDependencies": {
    "turbo": "^1.10.0",
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Credential Access

High
Category
Privilege Escalation
Content
```

```json
// .npmrc
# Hoist shared dependencies
shamefully-hoist=true
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Session Persistence

Medium
Category
Rogue Agent
Content
### Initial Setup

```bash
# Create new monorepo
npx create-turbo@latest my-monorepo
cd my-monorepo
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

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
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
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
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.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The markdown includes a CI step that conditionally runs `pnpm --filter web deploy`, which can affect production or staging systems. The document presents this as an example without any caution that deploy commands may change live environments and should be adapted with environment-specific safeguards.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill describes `pnpm changeset publish` and a GitHub Actions workflow using `NPM_TOKEN`, which can publish packages externally. The markdown does not warn users that these examples can release artifacts publicly or trigger irreversible version publication.

Missing User Warnings

Low
Confidence
83% confidence
Finding
This markdown file includes a cleanup script that runs `rm -rf node_modules`, which deletes installed dependencies and can disrupt a developer environment. The surrounding skill description does not warn users that some example commands perform deletion or cleanup actions.

Static analysis

No suspicious patterns detected.