Back to skill

Security audit

PineTS - PineScript executor

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for Pine Script market analysis, but its install instructions rely on unpinned npm/npx execution that should be reviewed before use.

Use this only if you are comfortable running `pinets-cli`. Prefer a pinned, locally installed version with a lockfile or verified package source, avoid global install in shared environments, and approve any live market-data fetches or output paths explicitly.

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:20
Finding

Unpinned Third-Party npm Package Installation and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 20-24
Vulnerability Type: Unpinned third-party dependency and unsafe package execution
Risk Level: Medium

bash
# Global install
npm install -g pinets-cli

# Or run directly with npx (no install needed)
npx pinets-cli run indicator.pine --symbol BTCUSDT -q

Technical Analysis

The documented commands install or execute pinets-cli without specifying a reviewed version or verifying an integrity digest. Consequently, npm resolves whichever package version is current when the command runs.

npm install -g installs the package globally and may execute package lifecycle scripts with the privileges of the invoking user. The npx command may download and immediately execute the latest available package when it is not already installed locally. Neither workflow uses a lockfile, an integrity hash, a verified artifact, or an option that prevents automatic network installation.

This creates a supply-chain exposure: compromise of the npm package, its maintainer account, the registry delivery path, or a transitive dependency could cause arbitrary attacker-controlled code to run. The referenced GitHub homepage does not ensure that the npm artifact being executed corresponds to a reviewed repository revision.

Attack Path

  1. An attacker compromises the npm publisher account, package release process, or one of the package's transitive dependencies.
  2. The attacker publishes a malicious version that includes hostile runtime code or npm lifecycle scripts.
  3. A user or agent follows the documented unpinned npm install -g pinets-cli or npx pinets-cli ... instruction.
  4. npm resolves and downloads the attacker-controlled release because no trusted version or integrity value is enforced.
  5. Malicious lifecycle or application code executes with the privileges and environment access of the invoking user.
  6. The payload may access files and credentials ...[truncated 870 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin pinets-cli to an explicitly reviewed version in every installation and execution example, such as pinets-cli@X.Y.Z.
  2. Prefer a project-local dependency recorded in package.json and a committed lockfile rather than a global installation.
  3. Use npm ci with a reviewed lockfile in automated environments so dependency resolution cannot silently drift.
  4. Verify npm package provenance, publisher identity, release signatures where available, and the package's integrity digest before execution.
  5. Configure an explicit trusted npm registry and prohibit unexpected registry overrides.
  6. Avoid automatic downloads through plain npx. Require a preinstalled, verified binary or use npx --no-install after validating the local installation.
  7. Install and execute the tool in a sandbox or container with minimal filesystem permissions, no unnecessary secrets, restricted network access, and a non-privileged account.
  8. Review package lifecycle scripts and consider disabling them during installation with --ignore-scripts if the package can operate without them.
  9. Document the expected artifact version and checksum so users and agents can fail closed when verification does not succeed.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description is broad enough to match common requests about technical analysis, indicators, and market data, which can cause over-selection and unintended invocation. In an agent setting, broad routing increases the chance that network-fetching or code-executing behavior is triggered in contexts where the user did not explicitly intend to run an external tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level description mentions fetching market data but does not clearly warn that this involves outbound network access to external sources. In agent environments, missing disclosure of network behavior can lead to privacy, compliance, or unexpected egress issues when the tool is invoked automatically.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

Using npx pinets-cli without a pinned version causes execution of whatever package version is current at invocation time. That creates a supply-chain risk where a compromised upstream release or typosquatted/transitively altered package could run arbitrary code on the host when the skill is used.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

This second unpinned npx pinets-cli reference has the same issue: it instructs dynamic retrieval and execution of code from the npm registry without version immutability. In a skill intended for command execution, that meaningfully increases the chance of arbitrary code execution through package compromise or unexpected breaking changes.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
### Data source (one required)

| Flag                    | Description                                                                                  |
| ----------------------- | -------------------------------------------------------------------------------------------- |
| `-s, --symbol <ticker>` | Symbol from Binance (e.g., `BTCUSDT`, `ETHUSDT`, `SOLUSDT.P` for futures)                    |
| `-t, --timeframe <tf>`  | Candle timeframe: `1`, `5`, `15`, `30`, `60`, `120`, `240`, `1D`, `1W`, `1M` (default: `60`) |

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documented -o, --output <path> option writes results to disk, but the skill does not prominently warn about filesystem side effects. In an automated agent context, undeclared file writes can overwrite files, leave sensitive artifacts behind, or violate sandbox expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.