Back to skill

Security audit

PayPilot by AGMS

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent payment-processing integration, but it asks agents to handle payment credentials and perform money-moving or account-changing actions without strong confirmation and scoping controls.

Install only if you trust the PayPilot/AGMS service and are comfortable letting an agent operate live payment workflows. Do not paste merchant passwords, gateway keys, card data, or bearer tokens into chat; prefer browser or secret-manager based setup. Require manual confirmation before every charge, refund, void, subscription change, and fraud-rule change, and use least-privilege, short-lived tokens where possible.

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

Error
Location
SKILL.md:95
Finding

Authentication and Gateway Credentials Exposed Through Chat and Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:23-40, SKILL.md:95-100, and references/payment-flows.md:17-20
Vulnerability Type: Sensitive credential exposure
Risk Level: High

Vulnerable Code

From SKILL.md:23-40:

bash
curl -s "https://paypilot.agms.com/v1/auth/register" -X POST \
  -H "Content-Type: application/json" \
  -d '{"name":"BUSINESS_NAME","email":"EMAIL","password":"PASSWORD"}'
bash
curl -s "https://paypilot.agms.com/v1/auth/login" -X POST \
  -H "Content-Type: application/json" \
  -d '{"email":"EMAIL","password":"PASSWORD"}'
bash
curl -s "https://paypilot.agms.com/v1/auth/configure" -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"gateway_key":"YOUR_GATEWAY_KEY"}'

From SKILL.md:95-100:

bash
Prompt the user for their password — never store it or read it from environment variables:
bash
# Re-login
LOGIN=$(curl -s "$API/v1/auth/login" -X POST \
  -H "Content-Type: application/json" \
  -d "{\"email\":\"$(echo $CONFIG | jq -r '.email')\",\"password\":\"$USER_PASSWORD\"}")

From references/payment-flows.md:17-20:

text
User: "I got approved, here's my security key"
Agent: → POST /v1/auth/register (create account)
Agent: → POST /v1/auth/configure (encrypt + store gateway key)
Agent: → "You're all set! Try: 'charge $50 to vault token XYZ'"

Technical Analysis

The Skill explicitly instructs the Agent to prompt for a merchant password and depicts the user supplying a gateway security key in the conversation. Secrets entered through an Agent conversation may be retained in conversation history, diagnostic logs, telemetry, memory systems, or service-provider records. This conflicts with the Skill's separate rule that API tokens and gateway keys must never appear in chat.

The provided curl commands also place passwords, gateway keys, JWT bearer tokens, and complete request bodies in process arguments. Depending on the operatin ...[truncated 2051 chars]

Remediation
View remediation

Remediation Suggestions

  1. Prohibit secrets in conversation

    • Explicitly instruct users never to enter passwords, gateway keys, JWTs, card data, or recovery credentials into chat.
    • Remove the instruction to prompt conversationally for the user's password.
    • Replace the example in payment-flows.md where the user supplies a security key in chat.
  2. Use a secure browser-based authorization flow

    • Redirect registration, login, token refresh, and gateway-key configuration to a trusted hosted HTTPS page.
    • Prefer OAuth 2.0 authorization code with PKCE, device authorization, or another short-lived delegated authorization mechanism.
    • Return only a short-lived authorization result to the Agent, not the merchant's password or gateway key.
  3. Avoid passing credentials through command arguments

    • Do not interpolate passwords, gateway keys, or bearer tokens directly into shell command lines.
    • Use a dedicated API client that accepts secrets through protected in-memory interfaces.
    • If command-line tooling is unavoidable, use protected standard input or a credential helper and disable shell tracing.
    • Ensure execution telemetry and error reporting redact Authorization headers and sensitive request fields.
  4. Harden token handling

    • Use narrowly scoped, short-lived access tokens and rotate them after suspected exposure.
    • Store refresh credentials in an operating-system credential store rather than a regular JSON file where supported.
    • Enforce restrictive permissions and validate ownership before reading local credential files.
    • Never print API responses containing access tokens.
  5. Add operational controls

    • Require explicit user confirmation before charges, refunds, voids, subscriptions, and fraud-rule changes.
    • Record non-sensitive audit events for security-sensitive operations without logging credentials.
    • Support immediate token and gateway-key revocation.
    • Add automated secret-redact ...[truncated 76 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (18)

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill instructs obtaining and storing an access token for payment operations, and later persists that token in a local config file. Access tokens for payment APIs are highly sensitive credentials; if exposed, they could allow unauthorized charges, refunds, transaction access, and fraud-rule manipulation.

Content

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

-d '{"name":"BUSINESS_NAME","email":"EMAIL","password":"PASSWORD"}'

text

2. **Login** to get an access token:
```bash
curl -s "https://paypilot.agms.com/v1/auth/login" -X POST \
  -H "Content-Type: application/json" \

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/gateway-api.md (reported line 19)May include surrounding context.

text

### Login
Returns a JWT access token.

POST /v1/auth/login {

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/gateway-api.md (reported line 134)May include surrounding context.

Cancel Subscription

text
DELETE /v1/subscriptions/<subscription_id>

Transaction History

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/gateway-api.md (reported line 179)May include surrounding context.

Delete Fraud Rule

text
DELETE /v1/fraud/rules/<rule_id>

Note: updates are not supported — delete and recreate instead.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The description promotes ongoing capabilities such as recurring billing, fraud analytics, fraud rule management, and first-time setup tied to saved credentials, which implies persistent authenticated sessions and repeated use over time. Session persistence is particularly sensitive in a payment skill because long-lived auth state raises the blast radius if the agent context, filesystem, or token store is compromised.

Content

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

md
---
name: paypilot
description: Process payments, send invoices, issue refunds, manage subscriptions, and detect fraud via a secure payment gateway proxy. Use when a user asks to charge someone, send a payment link, check sales, issue a refund, create recurring billing, view fraud analytics, configure fraud rules, or manage any payment-related task. Supports 3D Secure, AVS/CVV verification, and risk scoring. Also use for merchant onboarding and first-time payment setup.
metadata: {"openclaw":{"requires":{"bins":["curl","jq"]},"homepage":"https://agms.com/paypilot/"}}
---

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises very broad activation for sensitive financial operations, including charging, refunds, subscription management, fraud rules, and generic 'manage any payment-related task.' In an agent setting, broad routing increases the chance the skill is invoked from ambiguous prompts and performs high-risk payment actions without narrow scoping or clear user confirmation boundaries.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This sends registration credentials, including a password, to an external hosted proxy service. Although HTTPS is used, this is still a real external transmission of secrets to a third-party endpoint, and the risk is elevated because the skill is for payment processing and initial setup may normalize entering credentials into an agent-mediated workflow.

Content

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

  1. Register on the PayPilot proxy:
bash
curl -s "https://paypilot.agms.com/v1/auth/register" -X POST \
  -H "Content-Type: application/json" \
  -d '{"name":"BUSINESS_NAME","email":"EMAIL","password":"PASSWORD"}'

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

"token": "jwt_token_here" } EOF chmod 600 ~/.config/paypilot/config.json

text

**Note:** The password is used only during registration and login to obtain a JWT. It is never stored in the config file or read from environment variables.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

"token": "jwt_token_here" } EOF chmod 600 ~/.config/paypilot/config.json

text

**Note:** The password is used only during registration and login to obtain a JWT. It is never stored in the config file or read from environment variables.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

"token": "jwt_token_here" } EOF chmod 600 ~/.config/paypilot/config.json

text

**Note:** The password is used only during registration and login to obtain a JWT. It is never stored in the config file or read from environment variables.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The re-login flow explicitly instructs prompting for the user's password and transmitting it to the external API. In an agent context, collecting passwords through conversation is dangerous because secrets may be exposed in chat logs, tool traces, model memory, screenshots, or downstream observability systems even if the file says not to store them.

Content

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

Prompt the user for their password — never store it or read it from environment variables:

bash
# Re-login
LOGIN=$(curl -s "$API/v1/auth/login" -X POST \
  -H "Content-Type: application/json" \
  -d "{\"email\":\"$(echo $CONFIG | jq -r '.email')\",\"password\":\"$USER_PASSWORD\"}")
NEW_TOKEN=$(echo $LOGIN | jq -r '.access_token')

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This performs an external payment charge request, which is expected for the skill but still security-sensitive because it moves funds. In the absence of stronger confirmation, authorization, and anti-misrouting controls in the skill instructions, an agent could initiate real charges from ambiguous or malicious prompts.

Content

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

Process a payment using a vaulted card token. Never handle raw card numbers.

bash
curl -s "$API/v1/payments/charge" -X POST \
  -H "Content-Type: application/json" -H "$AUTH" \
  -d '{"amount":500.00,"token":"VAULT_ID","description":"Consulting — January"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented flows for refund, void, subscription cancellation, and fraud rule deletion do not require a user-facing warning or confirmation step before irreversible or financially sensitive actions. In a conversational agent, omission of explicit confirmation materially increases the risk of accidental refunds, canceled subscriptions, or weakened fraud controls from prompt ambiguity or misinterpretation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
74% confidence
Finding

This sends customer-identifying data to an external vault-related endpoint. While the content is limited and the skill states raw card data should not touch the agent, external transmission of customer PII is still sensitive and should be tightly bounded and transparently disclosed.

Content

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

Store a card securely — returns a vault token. The customer enters card details through a secure form; raw card data never touches the agent.

bash
curl -s "$API/v1/vault/add" -X POST \
  -H "Content-Type: application/json" -H "$AUTH" \
  -d '{"first_name":"John","last_name":"Smith","email":"john@example.com"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This externally creates fraud rules that can materially change transaction screening behavior. The transmission itself is expected, but in context it is security-sensitive because poorly governed rule creation could weaken fraud defenses or create denial-of-service conditions against legitimate payments.

Content

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

md
curl -s "$API/v1/fraud/rules" -H "$AUTH" | jq .

# Create a fraud rule (flag transactions over $5000)
curl -s "$API/v1/fraud/rules" -X POST \
  -H "Content-Type: application/json" -H "$AUTH" \
  -d '{"rule_type":"max_amount","threshold":"5000","action":"flag"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file describes refund and void endpoints, which can reverse or cancel financial transactions, but it provides no warning about their potentially irreversible business impact or the need to confirm intent before use. Under the markdown-specific SQP-2 criteria, user-facing documentation should warn when behavior can affect user data, finances, or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The onboarding flow accepts a 'security key' and immediately registers/configures the payment gateway, including encrypting and storing gateway credentials, without an explicit confirmation, identity check, or warning about the sensitivity of the action. In a payment skill, silent setup of merchant credentials can enable unauthorized account linking or misuse of live payment infrastructure if the user is mistaken, impersonated, or socially engineered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented flows allow charging vaulted cards, issuing refunds, voiding transactions, and creating recurring subscriptions with no explicit user confirmation or warning for high-impact financial operations. In this skill context, those actions directly move money or create ongoing billing obligations, so accidental prompts, ambiguous references like 'that last charge,' or prompt injection in surrounding context could trigger costly unauthorized transactions.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.