Back to skill

Security audit

Privacy virtual credit cards

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Privacy.com CLI integration, but it handles high-impact financial actions and full card credentials with insufficient safeguards.

Review before installing. Use only with a Privacy.com account and API key you intend the agent to access. Confirm any card-changing action manually, avoid retrieving full PAN/CVV through chat, and prefer installing a pinned, reviewed CLI version in a contained environment instead of a global latest npm install.

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

Warning
Location
SKILL.md:25
Finding

Unpinned Global Installation of a Third-Party CLI Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25-26
Vulnerability Type: Supply-chain exposure through an unpinned global dependency
Risk Level: Medium

Vulnerable Code

markdown
**If not installed, run the folling:**
`npm install -g @privacy-com/privacy-cli`

Technical Analysis

The Skill instructs the agent to install the latest available version of @privacy-com/privacy-cli globally. It does not pin an audited version, verify package integrity, use a lockfile, or require approval immediately before installation.

A global npm installation can run package lifecycle scripts under the privileges of the user running the agent. Although the package name is consistent with the declared Privacy.com integration, its effective contents may change after the Skill has been reviewed. Compromise of the package, publisher account, or registry delivery path could therefore introduce arbitrary executable code.

This is especially sensitive because the installed CLI is expected to access PRIVACY_API_KEY, Privacy.com card records, transaction information, and potentially complete payment-card credentials.

Attack Path

  1. An attacker compromises the package, its publisher account, or its dependency chain.
  2. A user invokes the Skill on a system where the privacy command is absent.
  3. The agent follows the installation instruction and retrieves the current package release with npm install -g.
  4. Malicious package code or an npm lifecycle script executes under the user's account.
  5. The code reads accessible credentials or data, including PRIVACY_API_KEY or ~/.privacy/config.
  6. The compromised CLI may subsequently intercept card-management commands, transaction results, or PAN output.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the permissions of the user running npm. The attacker could access files and environment variables available to ...[truncated 412 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the CLI to a specific version that has been reviewed, for example @privacy-com/privacy-cli@<approved-version>.
  • Verify the package against an expected registry, publisher identity, and integrity hash.
  • Prefer a project-local installation governed by a lockfile instead of a global installation.
  • Disable lifecycle scripts during installation when compatible with the package.
  • Require explicit user approval before installing or upgrading executable dependencies.
  • Execute the CLI in a restricted environment with access only to the required credential and resources.
  • Establish a controlled update process that reviews new package versions before changing the pin.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:42
Finding

Full Payment-Card Credentials Are Routed Through Agent Context and Chat Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 42-44 and 63-64
Vulnerability Type: Unsafe processing and disclosure of plaintext payment-card data
Risk Level: High

Vulnerable Code

markdown
- **Output Mode**: **ALWAYS** append the `--json` flag to your commands so you can parse the output programmatically!
- **Interactive Mode**: **NEVER** use the interactive REPL mode (`privacy` or `privacy interactive`). Always use non-interactive one-off commands. Do not prompt the user to use interactive mode either.
- **Security Warning (PAN Data)**: If the user asks for full card details (PAN, CVV, Expiry), you **MUST require explicit user confirmation** before running `privacy cards pan <token> --json`. **Do not log, save, or store the PAN output** in any file; only display it securely to the user in your response.
markdown
- **Get Full PAN (Sensitive):** 
  `privacy cards pan <token> --json`

Technical Analysis

The Skill correctly recognizes PAN, CVV, and expiry values as sensitive and requires explicit confirmation before retrieval. It also prohibits writing the result to a file. These controls reduce accidental disclosure but do not address the primary exposure: the command emits complete card credentials as JSON for the agent to parse and reproduce in a response.

Routing full card credentials through agent context may expose them to conversation history, model-processing infrastructure, telemetry, debugging systems, response logs, browser history, connected integrations, or anyone who can access the resulting session. The Skill calls the response a secure display mechanism but does not establish technical controls that make the chat channel secure or non-retentive.

Retrieval from Privacy.com's API is intrinsic to the declared PAN-display operation, so network communication with that service is not itself unauthorized. The excessive behavior is introducing the full plaintext result into ...[truncated 1528 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove full PAN retrieval from the agent workflow and direct users to Privacy.com's trusted application or another approved secure interface.
  • If CLI-based retrieval must remain available, display the result directly in a local terminal without returning it to model context, tool logs, or chat output.
  • Do not use JSON agent parsing for PAN, CVV, or expiry data.
  • Mask card numbers by default and avoid displaying CVV entirely through the agent.
  • Require explicit, action-specific confirmation immediately before any sensitive retrieval.
  • Ensure sensitive command output is excluded from telemetry, command history, traces, debugging records, and conversation retention.
  • Document the approved display channel and enforce access controls, short retention, and automatic redaction technically rather than relying only on textual instructions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Session Persistence

Medium
Category
Rogue Agent
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.

Content

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

md
---
name: privacy-cli
description: Use the Privacy CLI to create and manage Privacy Virtual Cards directly from the terminal. Trigger this skill whenever the user asks to create, list, pause, update, or close a virtual card, or fetch transaction history for Privacy.com.
compatibility: Requires PRIVACY_API_KEY environment variable and @privacy-com/privacy-cli npm package
metadata:
  required_env_vars:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger description is broad enough that the skill may activate for generic card-management or transaction-history requests without sufficient narrowing to Privacy.com or explicit user intent. In a financial-management context, unintended invocation can cause the agent to access or modify sensitive payment resources when the user may have meant another card provider or a non-actionable discussion.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## 3. Usage Guidelines for the Agent
- **Output Mode**: **ALWAYS** append the `--json` flag to your commands so you can parse the output programmatically!
- **Interactive Mode**: **NEVER** use the interactive REPL mode (`privacy` or `privacy interactive`). Always use non-interactive one-off commands. Do not prompt the user to use interactive mode either.
- **Security Warning (PAN Data)**: If the user asks for full card details (PAN, CVV, Expiry), you **MUST require explicit user confirmation** before running `privacy cards pan <token> --json`. **Do not log, save, or store the PAN output** in any file; only display it securely to the user in your response.

## 4. Commands Reference

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The instruction says to "ALWAYS" append the --json flag, which imposes a specific output format regardless of user preference or context. This is a natural-language policy concern because it removes user choice over presentation format rather than offering JSON as an implementation detail when appropriate.

Content

No source excerpt is available for this finding.