Back to skill

Security audit

Alipay

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Alipay integration guide that discloses its payment-related scope, local notes, and external endpoints without hidden execution or privilege escalation.

Install only if you are comfortable letting an agent help with payment integration decisions and local project notes. Keep using test mode until validation is complete, do not paste private keys or PSP secrets into chat, and review any production payment, refund, or rollout changes before applying them.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- CLI tools for diagnostics: `curl`, `jq`
- Access to Alipay merchant console and target PSP account

Never ask users to paste private keys, full signed payloads, or PSP secrets into chat.

## Data Storage
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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
mkdir -p ~/alipay
touch ~/alipay/{memory.md,implementations.md,validation-log.md,incidents.md}
chmod 700 ~/alipay
chmod 600 ~/alipay/{memory.md,implementations.md,validation-log.md,incidents.md}
```
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
mkdir -p ~/alipay
touch ~/alipay/{memory.md,implementations.md,validation-log.md,incidents.md}
chmod 700 ~/alipay
chmod 600 ~/alipay/{memory.md,implementations.md,validation-log.md,incidents.md}
```

5. If `memory.md` is empty, initialize it from `memory-template.md`.
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Guardrails

- Never ask the user to expose private keys in chat.
- Never store raw signed Alipay payloads in local notes.
- Never claim production readiness without validation evidence.
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.

Static analysis

No suspicious patterns detected.