Back to skill

Security audit

Massive.com CLI

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate Massive API purpose, but the published package is missing its main executable and documents credential and network behaviors that need review before use.

Review this skill before installing. Only use it if the package includes the missing scripts/massive executable from a trusted source, keep MASSIVE_API_KEY_REF and MASSIVE_BASE_URL under trusted control, avoid exec secret refs unless your runtime enforces them safely, and do not set a custom base URL unless you intend that service to receive the API credential.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/openclaw-secrets.md:13
Finding
Arbitrary Command Execution Through Exec-Based Secret References## Vulnerability Details **File Location**: `references/openclaw-secrets.md:13-19, 21-25, 37-45, 54-56` **Vulnerability Type**: Command injection through attacker-controlled secret reference configuration **Risk Level**: High ### Vulnerable Code ```text The CLI accepts a compact JSON object in `MASSIVE_API_KEY_REF` and resolves it before issuing any network request. Supported `source` values: - `env`: read a named environment variable - `file`: read a file path and trim the trailing newline - `exec`: execute a command and use stdout as the secret, matching OpenClaw's SecretRef model Supported keys by source: - `env`: `name` or `key` - `file`: `path` - `exec`: `command` or `cmd` ``` ```json {"source":"exec","command":"op read op://shared/massive/api-key"} ``` ```text ## Resolution Rules 1. Parse `MASSIVE_API_KEY_REF` as JSON. 2. Resolve the referenced value. 3. Fail before making the request if the reference cannot be resolved. 4. Fall back to `MASSIVE_API_KEY` only when `MASSIVE_API_KEY_REF` is unset. ``` ```text ## Alignment Note `exec` refs are intentionally supported to stay aligned with OpenClaw Secrets Management. Keep that behavior documented and assume the surrounding runtime is responsible for provider sandboxing and policy enforcement. ``` ### Technical Analysis The documented SecretRef contract accepts a command from the `MASSIVE_API_KEY_REF` environment variable and executes it to obtain a secret. This exposes a general command-execution interface where only credential retrieval is required. If the command is passed to a shell, command substitutions, separators, redirections, pipelines, or other shell syntax could execute arbitrary operations. Even if it is parsed without a shell, permitting an unrestricted executable and unrestricted arguments still allows invocation of tools unrelated to secret retrieval. The documentation delegates sandboxing and policy enforcement to ...[truncated 1738 chars]
Remediation
## Remediation Suggestions 1. Remove support for the `exec` SecretRef source from the Skill. 2. Prefer runtime-resolved secrets so the Skill receives only the resulting credential, not an executable command. 3. If command-based providers are unavoidable, map fixed provider identifiers to hardcoded executable paths and fixed argument structures. 4. Do not pass configuration text to `eval`, `bash -c`, `sh -c`, or equivalent shell interpreters. 5. Reject shell metacharacters, substitutions, redirections, and unapproved executables. 6. Execute approved providers with a minimal environment, restricted working directory, short timeout, disabled network access where possible, and least-privileged identity. 7. Add tests proving that unapproved executables and shell payloads are rejected. 8. Include `scripts/massive` in the artifact and audit its exact parsing and execution behavior before distribution.

T09 · Insecure Skill Coding Practices

Error
Location
references/security.md:7
Finding
API Credential Exfiltration Through Unrestricted Base URL Override## Vulnerability Details **File Location**: `references/security.md:7-12` **Related Locations**: `SKILL.md:41-46`, `agents/openai.yaml:23-26`, `references/massive-api.md:14-20` **Vulnerability Type**: Sensitive credential transmission to a configurable, untrusted network origin **Risk Level**: High ### Vulnerable Code From `references/security.md`: ```text ## Runtime Safety - Use `set -euo pipefail`. - Refuse to run with shell xtrace enabled. - Quote every expansion. - Allow requests only to `https://api.massive.com` by default. If `MASSIVE_BASE_URL` is explicitly set, allow only that HTTPS origin instead. - Send auth in headers only. - Keep structured data on `stdout` and diagnostics on `stderr`. ``` From `SKILL.md`: ```text ## Agent Rules - Keep output in JSON unless a human-readable mode is explicitly needed. - Send diagnostics to `stderr`; treat `stdout` as data. - Never print resolved secrets, auth headers, or raw secret-ref payloads. - Avoid `--verbose` in shared logs. - Feed `next_url` back into `get` or `next` instead of reconstructing pagination manually. - Treat non-`api.massive.com` absolute URLs as invalid unless `MASSIVE_BASE_URL` was explicitly changed to another HTTPS origin. ``` From `agents/openai.yaml`: ```yaml - name: MASSIVE_BASE_URL required: false preferred: false description: "Optional HTTPS origin override. Defaults to https://api.massive.com." ``` From `references/massive-api.md`: ```text The CLI accepts: - a relative Massive path such as `/v3/reference/tickers/AAPL` - a full `https://api.massive.com/...` URL - a `next_url` returned by Massive pagination By default, absolute URLs must stay on `https://api.massive.com`. If you explicitly set `MASSIVE_BASE_URL` to another HTTPS origin, that override becomes the only allowed absolute origin for direct requests and pagination. ``` ### Technical Analysis Sending a Massive ...[truncated 2133 chars]
Remediation
## Remediation Suggestions 1. Pin authenticated requests to `https://api.massive.com` unless a narrowly defined and trusted allowlist is required. 2. Do not send `MASSIVE_API_KEY` or a resolved Massive SecretRef when `MASSIVE_BASE_URL` differs from the official origin. 3. Require a separate credential variable for each approved custom origin. 4. Require explicit user confirmation or trusted administrator policy before enabling a non-default origin. 5. Compare normalized URL schemes, hosts, and effective ports; reject user-info fields, malformed hosts, and origin-confusion variants. 6. Disable redirects or validate every redirect hop and refuse any redirect that changes origin before forwarding authorization headers. 7. Add tests confirming that official credentials are never attached to custom origins or cross-origin redirects. 8. Include and audit `scripts/massive` to verify URL parsing, header attachment, DNS-independent origin checks, and redirect behavior.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: sudo apt-get update
      - run: sudo apt-get install -y shellcheck shfmt jq
      - run: |
          shfmt -d -i 2 -ci scripts/massive tests/test_massive.sh
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: sudo apt-get update
      - run: sudo apt-get install -y shellcheck shfmt jq
      - run: |
          shfmt -d -i 2 -ci scripts/massive tests/test_massive.sh
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill invokes shell commands (`scripts/massive ...`) but does not declare any explicit tool scope such as `permissions` or `allowed-tools`. In an agent environment, this can lead to overbroad shell access assumptions, making it easier for the skill to be executed with capabilities beyond what is necessary and weakening policy enforcement around command execution.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill enables implicit invocation without any stated trigger constraints, exclusions, or user-confirmation boundaries. Because this wrapper can access network resources and credentials for an external API, automatic invocation increases the chance that unrelated prompts or workflows cause unintended outbound requests or use of sensitive credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
local output stderr stdout_file
  stdout_file="${TMP_DIR}/stdout.json"
  export FAKE_CURL_STATUS="200"
  export FAKE_CURL_BODY='{"results":[{"ticker":"AAPL"}],"next_url":"https://api.massive.com/v3/reference/tickers?cursor=abc"}'
  stderr="$(
    MASSIVE_API_KEY="supersecret" \
    "${CLI}" --verbose get /v3/reference/tickers --query ticker=AAPL \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
local output stderr stdout_file
  stdout_file="${TMP_DIR}/stdout.json"
  export FAKE_CURL_STATUS="200"
  export FAKE_CURL_BODY='{"results":[{"ticker":"AAPL"}],"next_url":"https://api.massive.com/v3/reference/tickers?cursor=abc"}'
  stderr="$(
    MASSIVE_API_KEY="supersecret" \
    "${CLI}" --verbose get /v3/reference/tickers --query ticker=AAPL \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
local output stderr stdout_file
  stdout_file="${TMP_DIR}/stdout.json"
  export FAKE_CURL_STATUS="200"
  export FAKE_CURL_BODY='{"results":[{"ticker":"AAPL"}],"next_url":"https://api.massive.com/v3/reference/tickers?cursor=abc"}'
  stderr="$(
    MASSIVE_API_KEY="supersecret" \
    "${CLI}" --verbose get /v3/reference/tickers --query ticker=AAPL \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
local output stderr stdout_file
  stdout_file="${TMP_DIR}/stdout.json"
  export FAKE_CURL_STATUS="200"
  export FAKE_CURL_BODY='{"results":[{"ticker":"AAPL"}],"next_url":"https://api.massive.com/v3/reference/tickers?cursor=abc"}'
  stderr="$(
    MASSIVE_API_KEY="supersecret" \
    "${CLI}" --verbose get /v3/reference/tickers --query ticker=AAPL \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.