Back to skill

Security audit

Stripe Full Read Access

Security checks for vulnerabilities and agentic risk

Overview

The skill is a Stripe reporting helper, but it asks for broad Stripe credentials and leaves the door open to live financial write actions despite presenting itself as read-oriented.

Install only if you are comfortable giving the agent direct access to Stripe. Use a restricted read-only Stripe key wherever possible, avoid unrestricted platform secret keys, do not use this skill for refunds, payouts, transfers, or account changes, and rotate the key if it may have appeared in logs or shell history.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:27
Finding
Broad Stripe Credential Exposed Through Environment and Command-Line Expansion## Vulnerability Details **File Location**: `SKILL.md:27-43`; repeated command-line expansion at `SKILL.md:47-49`, `SKILL.md:53-55`, and `SKILL.md:98-110` **Vulnerability Type**: Credential exposure and excessive credential scope **Risk Level**: Medium ### Vulnerable Code ```bash export STRIPE_API_KEY="$(cat /home/clawd/.config/stripe/api_key)" ``` ```bash curl -sS https://api.stripe.com/v1/account \ -H "Authorization: Bearer $(cat /home/clawd/.config/stripe/api_key)" ``` The same command-line authorization pattern is also used for connected-account, balance, application-fee, payout, and charge requests. The Python pagination example similarly reads the platform credential and attaches it to outgoing Stripe requests: ```python key = Path('/home/clawd/.config/stripe/api_key').read_text().strip() count = 0 starting_after = None while True: params = {'limit': 100} if starting_after: params['starting_after'] = starting_after req = urllib.request.Request('https://api.stripe.com/v1/accounts?' + urllib.parse.urlencode(params)) req.add_header('Authorization', f'Bearer {key}') with urllib.request.urlopen(req, timeout=60) as r: data = json.load(r) ``` ### Technical Analysis The Skill instructs the Agent to read a locally stored Stripe API key and either export it to the process environment or substitute it directly into a `curl` command argument. Direct command-line expansion can make the bearer credential visible through process inspection, shell tracing, command telemetry, debugging output, terminal capture, or improperly configured logging. Exporting the key also propagates it to subsequently launched child processes. Sending the credential to `https://api.stripe.com` is necessary for the declared direct Stripe API functionality and is not evidence of transmission to an unrelated party. However, the documentation recommends a platform-level key for broad Connect report ...[truncated 1685 chars]
Remediation
## Remediation Suggestions 1. Require a Stripe restricted API key configured with only the read permissions necessary for the requested reporting endpoints. 2. Explicitly prohibit unrestricted platform secret keys and write-capable credentials for this Skill. 3. Avoid exporting the credential globally. Limit credential availability to the single process that performs the request. 4. Avoid placing bearer credentials directly in command-line arguments. Prefer an official Stripe SDK or a protected credential-loading mechanism that keeps secrets out of process arguments and ordinary logs. 5. Ensure shell tracing is disabled while credentials are loaded or used, and redact authorization headers from command, proxy, and diagnostic logs. 6. Apply restrictive filesystem permissions to the key file, such as owner-only read access, and validate ownership before use. 7. Use separate restricted keys for distinct reporting workloads or environments to reduce blast radius. 8. Rotate any key suspected of appearing in process telemetry, shell history, terminal recordings, or logs. 9. Add explicit endpoint allowlisting and reject write operations unless a separate, clearly authorized workflow is invoked with an appropriately scoped credential.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs loading a Stripe secret from disk into an environment variable and embedding command substitution directly in curl commands, but does not warn that environment variables, shell history, process listings, logs, crash reports, and downstream tooling can expose credentials. Because this is a high-value financial API key, casual handling materially increases the chance of secret leakage.

External Transmission

Medium
Category
Data Exfiltration
Content
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% 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
## Base URL

```text
https://api.stripe.com/v1/
```

## Quick checks
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The safety guidance contradicts the skill's stated read-only purpose by saying writes may be used if the user asks. In a high-privilege financial integration, this contradiction is dangerous because it normalizes escalation from analytics into live transactional actions using the same credential.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is presented as broad read-only Stripe access, but its safety section explicitly leaves the door open to write operations when requested. With a Stripe secret key, many write-capable endpoints are available, so this guidance weakens the read-only boundary and can enable refunds, transfers, payout actions, or account changes if an agent follows the examples loosely.

Static analysis

No suspicious patterns detected.