Back to skill

Security audit

GPCA

Security checks for vulnerabilities and agentic risk

Overview

This financial and shopping skill is mostly purpose-aligned, but it needs Review because it auto-installs unpinned remote code, accesses email verification codes, persists sessions, and has inconsistent payment-domain protections.

Review carefully before installing. Do not allow automatic setup unless you trust and have independently reviewed the referenced MCP server and its npm dependencies. Prefer manual entry of email verification codes, avoid granting inbox access for password reset, and do not let the agent fill card details on any merchant domain that is not strictly allowlisted and verified immediately before payment.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:17
Finding
Automatic Retrieval and Execution of Unpinned Remote Code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17-43` **Vulnerability Type**: Remote payload retrieval and supply-chain execution **Risk Level**: High ### Vulnerable Code ```markdown ## MCP Server Setup (Required — Auto-install) This skill needs the GPCA MCP server for API tools (`gpca_auth_status`, `gpca_list_cards`, etc.). When the user first uses this skill, check if the MCP tools are available. If not, run the setup steps below automatically. Do NOT ask the user to run them manually. ### Check if already installed Try calling `gpca_auth_status`. If the tool exists and returns a response (even `authenticated: false`), the MCP server is already configured — skip setup. ### Step 1: Clone and build ```bash git clone https://github.com/gpcaclaw/gpca-mcp-server.git ~/.gpca/mcp-server cd ~/.gpca/mcp-server && npm install && npm run build ``` ### Step 2: Register with mcporter ```bash mcporter config add gpca-card-manager --command node --arg ~/.gpca/mcp-server/dist/index.js ``` ### Step 3: Verify ```bash mcporter list gpca-card-manager ``` ``` The update procedure at `SKILL.md:39-43` repeats the same trust issue: ```bash cd ~/.gpca/mcp-server && git pull && npm install && npm run build ``` ### Technical Analysis The Skill instructs the agent to clone a mutable remote Git repository, install its npm dependencies, execute its build process, and register the resulting JavaScript as an MCP server. It explicitly requires this process to happen automatically without asking the user to perform or review the installation. The repository is not pinned to a reviewed commit or signed release. No checksum, signature, lockfile verification, provenance validation, or source inspection is required before execution. Consequently, the effective code executed by the Skill can change after this artifact has been audited. Both `npm install` and `npm run build` can execute arbitrary package lifecycle or build scripts. This expands the exposure beyond ...[truncated 2571 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor the reviewed MCP source into the distributable artifact, or pin the clone operation to a specific audited commit hash rather than a mutable branch. 2. Verify the repository or release using a trusted cryptographic signature and a documented expected checksum before building or executing it. 3. Commit and validate a dependency lockfile. Use `npm ci` instead of `npm install` so dependency resolution cannot silently drift. 4. Disable lifecycle scripts with `npm ci --ignore-scripts` where possible. If scripts are required, audit and explicitly allow only the necessary scripts. 5. Display the exact repository, commit, permissions, installation path, and executable command to the user and obtain informed approval before installation. 6. Run the MCP server in a restricted sandbox with minimal filesystem and network access. Do not grant access to unrelated browser profiles, SSH keys, environment secrets, or user files. 7. Apply least-privilege controls to every MCP tool and independently authorize sensitive operations such as card-detail retrieval, KYC upload, and financial transfers. 8. Pin updates to reviewed versions instead of using unrestricted `git pull`. Revalidate signatures, checksums, and dependencies for every update. 9. Document and implement a secure uninstall procedure that removes the MCP registration and installed files. 10. Perform a separate audit of the referenced MCP repository and its dependency tree before treating the financial operations as trusted. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/shopping-assistant.md:196
Finding
Payment Domain Allowlist Can Be Bypassed Through User Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `references/shopping-assistant.md:196-203`; related payment handling at `references/shopping-assistant.md:136-145` **Vulnerability Type**: Fail-open payment-domain validation **Risk Level**: High ### Vulnerable Code The domain policy states: ```markdown ## Trusted Domains (Whitelist) Only fill payment information on pages whose domain matches: - `amazon.com`, `amazon.co.jp`, `amazon.co.uk`, `amazon.de`, `amazon.fr`, `amazon.it`, `amazon.es`, `amazon.ca`, `amazon.com.au` - `ebay.com` - `walmart.com`, `target.com`, `bestbuy.com` - `taobao.com`, `tmall.com` (payment via Alipay) - `alipay.com`, `alipayobjects.com` (Alipay payment page) - `jd.com` (京东) If user requests a site not on this list, confirm: "This site is not in my trusted domain list. Are you sure you want to proceed with payment on [domain]?" ``` The payment workflow at `references/shopping-assistant.md:136-145` retrieves and fills complete card credentials: ```markdown ### Step 5: Payment (SECURITY CRITICAL) 1. **Pre-payment domain check**: Verify current page URL is trusted. If not, STOP. 2. Take a snapshot to identify payment form fields 3. Retrieve card details **at this moment only**: - `gpca_list_cards` — card number, expiry date - `gpca_get_cvv` — CVV 4. Fill payment form: card number, expiry (MM/YY), CVV, cardholder name 5. **NEVER** repeat card number, CVV, or expiry in conversation ``` ### Technical Analysis The policy is internally inconsistent. Step 5 requires the agent to stop when a domain is untrusted, while the trusted-domain section provides a confirmation prompt that implies payment may continue on any unlisted site after the user approves. User confirmation establishes intent, but it does not establish that a domain is technically trustworthy. A user can be deceived by a lookalike domain, a fraudulent merchant, a misleading redirect, or social engineering. Allowing confirmation to override the allowlist converts a s ...[truncated 2624 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Make the payment allowlist fail closed. Never retrieve or fill card credentials on an unlisted domain, even if the user confirms. 2. For unsupported merchants, require the user to enter payment details manually or use a trusted third-party payment provider without exposing card data to the agent. 3. Parse URLs using a standards-compliant URL parser and compare normalized hostnames, not raw strings or substring matches. 4. Permit only the exact approved hostname or explicitly documented subdomains. Ensure that a value such as `amazon.com.attacker.example` is rejected. 5. Verify the effective top-level domain and account for internationalized domain-name normalization and punycode lookalikes. 6. Require HTTPS with valid certificate verification and reject URLs containing embedded credentials, unexpected ports, or invalid certificate states. 7. Revalidate the final URL after every redirect and immediately before retrieving card details, filling each payment field, and submitting the form. 8. Validate the origin of payment iframes separately. Do not enter credentials into cross-origin frames unless their exact provider domains are independently allowlisted. 9. Clear partially completed payment fields and stop if navigation, origin, or frame context changes during checkout. 10. Reconcile the contradictory instructions so all relevant sections explicitly state that user confirmation cannot override payment-domain validation. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (27)

Missing User Warnings

High
Confidence
93% confidence
Finding
The KYC section describes submitting KYC data and uploading KYC documents, which involves processing highly sensitive personal information. The markdown provides no warning about privacy implications, secure handling expectations, or the need for explicit user consent before collecting or uploading identity documents.

Ssd 3

High
Confidence
97% confidence
Finding
The skill establishes a natural-language workflow for accessing and reading a user's mailbox contents to extract authentication data. In a banking/shopping context, this is especially dangerous because the same session may expose other sensitive emails, account recovery messages, financial alerts, or personal data, enabling broader compromise than the immediate OTP use case.

Ssd 3

High
Confidence
97% confidence
Finding
The flow instructs the agent to access the user's email account and extract a one-time login code, effectively placing the agent inside a second-factor authentication channel. In a banking/card-management skill, this is especially dangerous because mailbox access can expose password resets, financial notifications, and other account recovery materials, enabling broader account takeover or sensitive data disclosure beyond the GPCA session.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## MCP Server Setup (Required — Auto-install)

This skill needs the GPCA MCP server for API tools (`gpca_auth_status`, `gpca_list_cards`, etc.). When the user first uses this skill, check if the MCP tools are available. If not, run the setup steps below automatically. Do NOT ask the user to run them manually.

### Check if already installed
Confidence
93% confidence
Finding
The instruction to automatically perform setup and explicitly not ask the user removes an approval checkpoint before executing system-changing actions. In the context of cloning, building, and registering an MCP server, this increases the risk of unauthorized environment modification and silent execution of untrusted code.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to automatically clone, build, and register external software from a remote GitHub repository using shell commands. This creates a software supply chain and arbitrary code execution risk, especially because the installation is performed without explicit user approval and is not constrained to a vetted package source or pinned commit.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
This markdown file documents actions such as registration, login, password reset, and account/profile access, which affect authentication state and sensitive user data. The reference provides no warning or disclosure about handling credentials, email codes, or account changes, despite the file describing security-relevant behaviors.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The documented tools include ordering cards, binding/activating/freezing cards, changing or resetting PINs, viewing CVV, obtaining deposit addresses, and transferring value to cards. These behaviors can affect financial assets or expose sensitive payment data, yet the file contains no cautionary language about user confirmation, financial risk, or sensitive-data handling.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The workflow explicitly offers automatic reading of email verification codes by opening the user's mailbox in a browser, which extends the skill's access into highly sensitive email content beyond core card and wallet operations. Email inbox access can expose unrelated messages, account-reset links, financial notifications, and personal data, creating a significant privacy and account-compromise risk if misused or over-broadened.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The workflow describes automatic mailbox access without clearly warning users that the agent may see broader email contents than just the verification code. Lack of informed disclosure weakens user consent and increases the risk that users unknowingly expose personal, financial, or security-related communications.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The login flow not only offers automatic inbox reading for verification retrieval, but instructs the agent to remember the user's prior choice and default to auto-login next time without re-asking. Reusing prior consent for mailbox access increases the chance of silent overreach into sensitive email data and undermines meaningful, context-specific authorization for each access event.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
Persisting a default to future auto-login without re-asking omits a warning about the continuing privacy implications of repeated mailbox access. Users may not realize that a prior one-time choice is being treated as ongoing authorization to inspect future inbox contents.

Ssd 3

Medium
Confidence
90% confidence
Finding
The instruction to remember a user's auto-login preference creates retention of a behavioral preference tied to sensitive email-based code retrieval. Even if the retained data is minimal, storing this preference normalizes repeated mailbox access and can enable future privacy-invasive behavior without renewed consent.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The forgot-password workflow extends automatic email-reading into account recovery, one of the most security-sensitive operations in the system. Accessing a mailbox during password reset can expose highly sensitive recovery messages and creates a path where compromise of the agent or misuse of the feature could facilitate account takeover or unauthorized reset assistance.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
Offering automatic email reading during password recovery without a clear warning is especially risky because reset messages are highly sensitive and may coexist with other account-security emails. Users are not adequately informed of the scope and consequences of granting mailbox access in this context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Financial Operation Safety
- **Always confirm** before executing: transfers, card orders, PIN changes
- Show exact amounts and target card before confirmation
- Never auto-execute financial operations without explicit user consent
- **No auto-retry for transfers**: If `gpca_deposit_to_card` times out or returns an ambiguous error, do NOT retry — risk of double transfer. Ask user to check balance first.

## Session Management
Confidence
85% 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.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The workflow explicitly instructs the agent to open and inspect the user's email inbox to retrieve a GPCA login code. Even with stated scope limits, this grants the agent access to unrelated mailbox content and expands data access beyond the core payment task, creating a real privacy and credential-exposure risk.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The Taobao/Alipay confirmation and escalation messages are written as fixed Chinese-language prompts, which implies the skill may force a specific language during parts of the workflow. The file does not state that the user can choose their preferred language or that Chinese is optional for these responses.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The documentation broadens the skill's operational scope from Amazon/Taobao to eBay and JD.com, creating a mismatch between declared capabilities and actual guided behavior. Scope drift is dangerous because it can enable automation on sites users and reviewers did not explicitly authorize, weakening trust boundaries and policy review assumptions.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The instruction to store the user's shipping address in conversation memory introduces retention of sensitive personal data without clear notice, limitation, or deletion guidance. Even if intended for convenience, retaining address data increases exposure through unintended reuse, overcollection, or later disclosure in unrelated interactions.

Ssd 3

Medium
Confidence
95% confidence
Finding
Natural-language instructions to retain and reuse shipping addresses create a data retention risk because they normalize storing personal information beyond the immediate transaction. In a skill handling shopping, bank cards, wallet activity, and KYC-related workflows, this increases the consequences of privacy leakage or cross-session misuse.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The file documents inbox access and retrieval of GPCA verification codes from multiple email providers, but this sensitive capability is not disclosed in the stated skill scope. Accessing email expands the privilege boundary significantly because it exposes unrelated private communications and enables interception of authentication or verification secrets.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The email-provider guidance instructs the agent to access inboxes and extract verification codes without a clear warning that this exposes highly sensitive email content. In the context of a shopping and financial skill, email access is especially risky because inboxes may contain payment alerts, identity documents, and other authentication messages unrelated to the requested purchase.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The flow explicitly offers to open the user's mailbox in a browser and extract a GPCA one-time code on the user's behalf. Even if limited to a single email, this expands the skill's access into a highly sensitive channel and is not necessary for core card, wallet, or shopping functions described elsewhere. In a financial-account context, normalizing mailbox access for OTP retrieval increases the risk of over-collection and account compromise.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The auto-login path has the agent access the user's email and retrieve a verification code, but the flow does not present any explicit privacy notice about mailbox access, visibility into other messages, or handling of sensitive data. Because email is a broad, high-value repository, omitting a clear warning and consent boundary can mislead users about the extent of access and expose unrelated private information.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The instruction mandates telling the user a Chinese message after setup completion. This imposes a specific language on users without offering a language choice or documenting a justified locale constraint, which conflicts with the language/locale policy for natural-language content.

Static analysis

No suspicious patterns detected.