Back to skill

Security audit

gotrain

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward MTA train-times helper, with the main caution that it installs an unpinned npm command globally.

Before installing, consider that npm will fetch the current gotrain package globally. Install it only if you trust the package and maintainer, avoid elevated privileges, and prefer a pinned or locally scoped install if you need stronger supply-chain 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:4
Finding
Unpinned Third-Party npm Package Installed Globally## Vulnerability Details **File Location**: `SKILL.md`, lines 4-15 **Vulnerability Type**: Unpinned third-party dependency installed with global scope **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"requires":{"bins":["gotrain"]},"install":[{"id":"node","kind":"node","package":"gotrain","bins":["gotrain"],"label":"Install gotrain (npm)"}]}} ``` ```markdown ## Installation ```bash npm install -g gotrain ``` ``` ### Technical Analysis The skill declares and recommends installation of the third-party `gotrain` npm package without an exact version or integrity constraint. Consequently, npm resolves whichever package release is current at installation time rather than a release whose contents were reviewed with this skill. npm installation may execute package lifecycle scripts. The global installation flag (`-g`) also places package files and executables in globally configured npm locations. The document provides neither package integrity verification nor evidence that the npm artifact corresponds to the linked source repository. This creates a supply-chain trust boundary outside the audited project. No evidence in the reviewed file establishes that the current package is malicious. The risk arises because a future compromised, replaced, or unexpectedly modified release could be installed and executed without changes to this skill. ### Attack Path 1. An attacker compromises the `gotrain` npm publishing account, package, or an upstream component included in a later release. 2. The attacker publishes a malicious release under the same mutable package name. 3. A user or agent follows the skill metadata or documented command and runs `npm install -g gotrain`. 4. npm resolves the attacker-controlled release because no exact version or integrity value is specified. 5. Malicious lifecycle scripts may execute during installation, or attacker-controlled code may run when the globally installed ...[truncated 754 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to a reviewed exact version instead of resolving the latest release, for example `gotrain@X.Y.Z`. 2. Use a lockfile and verified registry integrity metadata in a reproducible installation workflow. 3. Verify npm package provenance, maintainer identity, signatures or attestations, and correspondence between the published artifact and the referenced source repository. 4. Prefer a project-local installation over `npm install -g` to reduce system-wide effects and constrain executable resolution. 5. Review package lifecycle scripts and install with lifecycle scripts disabled where compatible, such as by using `--ignore-scripts`. 6. Continuously monitor the pinned dependency and its transitive dependencies for compromise and known vulnerabilities; update only after review. 7. Perform installation and execution under a non-privileged account in a sandbox or similarly restricted environment.
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

Static analysis

No suspicious patterns detected.