Skip to content

fix(skills): harden AI agent skills against prompt injection, autonomous spending, and insecure transport - #93

Open
mozluk wants to merge 1 commit into
moonpay:mainfrom
mozluk:mozluk-patch-1
Open

fix(skills): harden AI agent skills against prompt injection, autonomous spending, and insecure transport#93
mozluk wants to merge 1 commit into
moonpay:mainfrom
mozluk:mozluk-patch-1

Conversation

@mozluk

@mozluk mozluk commented Aug 30, 2026

Copy link
Copy Markdown

Motivation

This PR hardens multiple AI agent skills within the skills repository to address high and medium-severity vulnerabilities identified during the workspace security audit[cite: 6]. Previously, several skills allowed agents to execute irreversible financial transactions without user confirmation, ingested untrusted remote content as instructions (prompt injection), utilized plaintext HTTP for shell script execution, and performed autonomous OTP logins by reading user mailboxes without explicit consent[cite: 6].

Modifications

  • Irreversible Action Guardrails (moonpay-swap-tokens, moonpay-buy-crypto, yield-optimization):
    • Implemented strict pre-execution confirmation gates[cite: 6]. The agent must now explicitly read back the full destination address and amount to the user for approval before signing or broadcasting any fund-moving transactions[cite: 6].
  • Prompt Injection Defenses (allium-x402, etc.):
    • Added explicit directives ensuring the agent treats remote Markdown and paid API responses purely as data to report, rather than instructions to obey[cite: 6]. The agent is now strictly forbidden from complying with third-party content that requests calling another service, raising spend limits, or revealing credentials[cite: 6].
  • Autonomous Login Restrictions (moonpay-auth):
    • Removed "no human in the loop" autonomous OTP login[cite: 6]. The skill now requires explicit user consent before triggering a login, restricts mailbox searches exclusively to MoonPay verification messages, and prohibits writing the OTP or session credential anywhere except the verification prompt[cite: 6].
  • Transport Security & Documentation (allium-x402, dune-analytics, messari-alpha-scout, corbits-marketplace, myriad-prediction-markets):
    • Upgraded the curl | sh installer instructions in allium-x402 from plaintext HTTP to HTTPS to prevent network tampering[cite: 6].
    • Cleaned up documentation by removing phantom cross-references to non-existent skills (e.g., moonpay-bridge-tokens and moonpay-budget-agent)[cite: 6].

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

New Skill

Skill name: skills/{partner}-{name}/ (e.g., corbits-marketplace)

Description: What does this skill do?

Primary chain: (e.g., Ethereum, Solana, Polygon)

Primary token: (e.g., USDC, ETH, SOL)

Checklist

  • skills/{name}/SKILL.md with YAML frontmatter (name, description)
  • Skill added to .claude-plugin/marketplace.json
  • Description is specific about when Claude should trigger this skill

MoonPay Integration

How does this skill use MoonPay wallets/payments? (e.g., micropayments, transaction signing, wallet funding)

Example Usage

# Show an end-to-end workflow using this skill

…ous spending, and insecure transport

## Motivation

This PR hardens multiple AI agent skills within the `skills` repository to address high and medium-severity vulnerabilities identified during the workspace security audit[cite: 6]. Previously, several skills allowed agents to execute irreversible financial transactions without user confirmation, ingested untrusted remote content as instructions (prompt injection), utilized plaintext HTTP for shell script execution, and performed autonomous OTP logins by reading user mailboxes without explicit consent[cite: 6]. 

## Modifications

* **Irreversible Action Guardrails (`moonpay-swap-tokens`, `moonpay-buy-crypto`, `yield-optimization`)**:
  * Implemented strict pre-execution confirmation gates[cite: 6]. The agent must now explicitly read back the full destination address and amount to the user for approval before signing or broadcasting any fund-moving transactions[cite: 6]. 
* **Prompt Injection Defenses (`allium-x402`, etc.)**:
  * Added explicit directives ensuring the agent treats remote Markdown and paid API responses purely as data to report, rather than instructions to obey[cite: 6]. The agent is now strictly forbidden from complying with third-party content that requests calling another service, raising spend limits, or revealing credentials[cite: 6].
* **Autonomous Login Restrictions (`moonpay-auth`)**:
  * Removed "no human in the loop" autonomous OTP login[cite: 6]. The skill now requires explicit user consent before triggering a login, restricts mailbox searches exclusively to MoonPay verification messages, and prohibits writing the OTP or session credential anywhere except the verification prompt[cite: 6].
* **Transport Security & Documentation (`allium-x402`, `dune-analytics`, `messari-alpha-scout`, `corbits-marketplace`, `myriad-prediction-markets`)**:
  * Upgraded the `curl | sh` installer instructions in `allium-x402` from plaintext HTTP to HTTPS to prevent network tampering[cite: 6].
  * Cleaned up documentation by removing phantom cross-references to non-existent skills (e.g., `moonpay-bridge-tokens` and `moonpay-budget-agent`)[cite: 6].

## Checklist

- [x] Format your code according to the Contributor Guide.
- [ ] Add unit tests as outlined in the Contributor Guide.
- [x] Update documentation as needed, including docstrings or example tutorials.
@mozluk
mozluk requested a review from a team as a code owner August 30, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant