Back to skill

Security audit

cargo-billing

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Cargo billing helper, but it combines admin billing access with unsafe payment-card handling instructions and unpinned executable CLI installation.

Review before installing. Use this only with a Cargo workspace where admin billing access is appropriate. Prefer the hosted Stripe portal or hosted card form, do not paste full card numbers or CVC into chat or shell commands, and avoid unpinned @latest/npm/npx execution unless you trust the current CLI release and update process.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:13
Finding
Unpinned Executable npm Dependency Creates a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:13-16`, `SKILL.md:34-36`, and `references/troubleshooting.md:10` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```yaml install: - kind: node package: "@cargo-ai/cli@latest" bins: - cargo-ai ``` ```bash npm install -g @cargo-ai/cli # no global install? prefix every command with `npx @cargo-ai/cli` cargo-ai login --email you@company.com # emailed code, no browser; creates the account on first use # alternatives: --oauth (browser) · --token <api-token> (CI) ``` The troubleshooting guide repeats the unsafe installation recommendation: ```markdown | `command not found: cargo-ai` | CLI not installed or not in PATH | Run `npm install -g @cargo-ai/cli` or prefix with `npx @cargo-ai/cli` | ``` ### Technical Analysis The Skill installs `@cargo-ai/cli@latest` and recommends executing the package through `npx` without specifying an audited version or integrity value. Both approaches resolve a mutable package version at execution time. Consequently, the code that users execute can differ from the version that was present when the Skill was audited. Because this is an executable CLI rather than a passive library, npm package installation scripts and the CLI process run with the permissions of the invoking user. The Skill subsequently authenticates the CLI using an administrative Cargo token or an existing authenticated session. A compromised, malicious, or unexpectedly changed release could therefore access credentials, billing information, workspace resources, and other data available to the authenticated CLI. The audit found no evidence that the current package is malicious. The vulnerability is the absence of dependency pinning and integrity controls, which leaves future executions exposed to upstream package compromise or unsafe release changes. ### Attack Path 1. An att ...[truncated 1393 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@cargo-ai/cli@latest` with an exact, reviewed version: ```yaml package: "@cargo-ai/cli@X.Y.Z" ``` 2. Update all bootstrap and troubleshooting examples to use the same exact version: ```bash npm install -g @cargo-ai/cli@X.Y.Z npx --yes @cargo-ai/cli@X.Y.Z ``` 3. Use npm lockfiles and integrity metadata where the Skill packaging system supports them. 4. Establish a controlled dependency-update process that reviews release notes, package provenance, installation scripts, and changed transitive dependencies before changing the pinned version. 5. Prefer npm provenance verification or signed artifacts when available. 6. Avoid running npm installation commands with elevated operating-system privileges. 7. Use a narrowly scoped token where Cargo supports one, rather than exposing a broadly privileged administrative token to mutable executable code. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:234
Finding
Payment-Card Data May Be Exposed Through Shell, Process, and Conversation Logs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:234-248` **Vulnerability Type**: Plaintext handling of payment-card data **Risk Level**: High ### Vulnerable Code ```bash # Card details — no browser, nothing to hand off cargo-ai billing subscription update-payment-method \ --card-number 4242424242424242 --card-exp 12/2030 --card-cvc 123 # Same, but keeps the number out of shell history and the process list echo '{"number":"4242424242424242","expMonth":12,"expYear":2030,"cvc":"123"}' \ | cargo-ai billing subscription update-payment-method --card-stdin # No card details — prints a Stripe-hosted form URL and waits for the card to land cargo-ai billing subscription update-payment-method ``` The surrounding instructions state: ```markdown **Prefer `--card-stdin`.** Anything passed as a flag is visible in shell history and to any process that can read the process list. Card details go from your machine straight to Stripe in exchange for a token; they never reach the Cargo API, and no output prints them. **Never invent card details, and never reuse a number from elsewhere in the conversation.** Ask the user for them, or use the no-argument form and hand them the URL. ``` ### Technical Analysis The first command places the full primary account number, expiration date, and CVC directly in command-line arguments. These values can be retained in shell history and exposed through process inspection, terminal recording, command auditing, endpoint monitoring, or diagnostic collection. The recommended stdin example does not adequately address this problem. Although the `cargo-ai` process receives the data through stdin, the literal payment-card data remains embedded in the preceding `echo` command. An interactive shell can persist the entire command in its history, and process-monitoring facilities may observe the `echo` process and its arguments while it runs. The claim that this construction keeps the number out of shell history and the process l ...[truncated 1939 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make the no-argument Stripe-hosted form the only documented default: ```bash cargo-ai billing subscription update-payment-method ``` 2. Instruct the Agent never to request, receive, repeat, store, or place full card numbers or CVC values in a conversation. 3. Remove examples that pass payment data through command-line flags. 4. Remove the literal `echo` pipeline and the inaccurate claim that it avoids shell-history and process-list exposure. 5. If a non-browser stdin workflow is operationally essential, use a dedicated interactive prompt that: - disables terminal echo, - reads values directly from the terminal, - writes them only to the target process's stdin, - avoids command-line arguments and environment variables, - does not create temporary files, and - clears sensitive buffers as soon as practical. 6. Require explicit user confirmation before replacing the workspace's existing payment method. 7. Ensure application, Agent, terminal, and telemetry logs redact full card numbers and never retain CVC values. 8. Document that hosted billing URLs are sensitive session links and should be sent only to the intended authenticated user. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger list contains broad natural-language phrases such as cost, budget, invoices, and payment-method questions that can match ordinary conversation and invoke a high-privilege billing skill unnecessarily. In this context the risk is amplified because the skill requires admin access and includes state-changing operations like payment-method updates and portal-session creation, increasing the chance of overbroad invocation leading to sensitive billing exposure or unintended actions.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill introduces payment-method update commands in quick-reference material without an upfront, prominent warning that this skill can perform billing-state changes and handle highly sensitive payment data. That increases the likelihood that an agent or user treats the skill as informational-only and proceeds into card-update flows or portal generation without adequate consent, confirmation, or data-handling caution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill explicitly recommends running the CLI via `npx @cargo-ai/cli` while metadata installs `@cargo-ai/cli@latest`, leaving execution and installation unpinned. Because this skill requires an admin token and exposes billing and payment-method operations, a compromised or malicious upstream package version could execute with privileged workspace access and potentially alter billing state or exfiltrate sensitive data.

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.