Back to skill

Security audit

agent-commerce

Security checks for vulnerabilities and agentic risk

Overview

The skill describes a clearly scoped, user-controlled payment gateway setup, with no supported evidence of hidden or malicious behavior.

Start on testnet and expose only the endpoints you intend. Protect the gateway's secrets and receipt database, and follow the documented authentication, TLS and backend-access restrictions before public deployment. Mainnet requires explicit approval; a payment may remain settled even if the backend fails, without an automatic refund. This review covers the bundled instructions and configuration, not the external npm runtime or its dependencies.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
- **L1:** `npx --no -- agent-commerce validate --env-file .env` exits 0.
- **L2:** with the API up and `npx --no -- agent-commerce start --env-file .env`
  running in another terminal or in the background,
  `npx --no -- agent-commerce doctor --env-file .env --json` reports
  `"exitCode": 0` and a `Gateway` check with `"status": "PASS"`. Report any
  warnings. Backend probes send GET requests to distinct configured URLs,
  substituting `demo-check` for path parameters, without backend credentials

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/troubleshooting.md (reported line 57)May include surrounding context.

md
A 502 `PAYMENT_SETTLEMENT_FAILED` means settlement was not confirmed and no
receipt was created. Use
`npx --no -- agent-commerce reconcile --env-file .env --dry-run` to report
chain evidence without recording resolutions or hold updates; omit `--dry-run`
to apply them. Retry `unknown` results later, or investigate on chain before
recording an operator verdict with `npx --no -- agent-commerce resolve`.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/production.md (reported line 85)May include surrounding context.

md
[Service]
WorkingDirectory=/srv/agent-commerce
Environment=NODE_ENV=production
ExecStart=/srv/agent-commerce/node_modules/.bin/agent-commerce start --config /srv/agent-commerce/config.yaml --env-file /srv/agent-commerce/.env
Restart=on-failure
User=agent-commerce

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

For L3, the request body is the resource input:

bash
curl -s -X POST http://127.0.0.1:8080/api/resources/premium_report/invoke -H 'content-type: application/json' -d '{}'

Mainnet comes only after the user confirms it explicitly; see

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/production.md (reported line 55)May include surrounding context.

md
allowMainnet: true
    facilitator:
      mode: remote
      url: https://api.cdp.coinbase.com/platform/v2/x402
      auth:
        type: cdp
        apiKeyId: ${CDP_API_KEY_ID}

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · references/troubleshooting.md (reported line 80)May include surrounding context.

md
otherwise it is 0, even with warnings. For L2, also require a passing `Gateway`
check and report warnings.

| Check                        | Not passing means                                                                                                                                                                                                                                                                             |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config`                     | `validate` would fail; fix that first