Back to skill

Security audit

XPR Network Dev

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent XPR blockchain development reference, but several examples could lead users or agents to expose signing keys, deploy unauthenticated payment logic, or run broad privileged infrastructure setup.

Install only if you will treat this as reference material, not copy-paste production guidance. Use testnet first, do not put private keys in shell arguments or environment variables, pin and verify downloaded packages and npm dependencies, authenticate and de-duplicate webhooks, restrict node services behind hardened networking, and require human review before any transaction, permission, cron, or node-setup command is run.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
payment-patterns.md:660
Finding

Unauthenticated Payment Webhook Can Trigger Repeated Fulfillment

Content
View full analysis
{ const { invoiceId } = req.body; const invoice = await invoiceService.getInvoice(invoiceId); if (invoice.status !== 'paid') return res.status(400).send('Not paid'); const order = await getOrderByInvoice(invoiceId); // Update order status await updateOrder(order.id, { status: 'paid', paidAt: new Date() }); // Send confirmation email await sendOrderConfirmation(order); // Trigger fulfillment await startFulfillment(order); res.send('OK'); }); ``` ### Technical Analysis The webhook accepts an attacker-controlled `invoiceId` and performs security-sensitive business operations without authenticating the sender. It does not verify an HMAC signature, provider identity, timestamp, nonce, or event identifier. Checking the current invoice status does not authenticate the request. If an invoice is legitimately paid, any party that discovers or guesses its identifier can submit the endpoint request. The handler also lacks an atomic idempotency check, so replayed or concurrent requests can repeatedly invoke `sendOrderConfirmation` and `startFulfillment`. ### Attack Path 1. An attacker obtains a valid paid invoice identifier through logs, URLs, browser history, predictable identifier generation, or another information disclosure. 2. The attacker sends a forged request: ```http POST /webhooks/payment Content-Type: application/json {"invoiceId":"VALID_PAID_INVOICE"} ``` 3. The server observes that the invoice is paid and accepts the unauthenticated request. 4. The attacker repeats the request or sends multiple concurrent requests. 5. The application repeatedly starts fulfillment and sends confirmations unless downstream systems indepen ...[truncated 499 chars]
Remediation
View remediation
{ verifyWebhookSignature(req.rawBody, req.headers, webhookSecret); const event = parseAndValidateWebhook(req.rawBody); const claimed = await atomicallyClaimWebhookEvent( event.id, event.invoiceId ); if (!claimed) { return res.status(200).send('Already processed'); } await startFulfillmentOnce(event.invoiceId); res.send('OK'); }); ``` ]]>

T09 · Insecure Skill Coding Practices

Error
Location
cli-reference.md:63
Finding

Blockchain Private Keys Are Passed Through Shell Arguments and Environment Variables

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
node-operation.md:300
Finding

Node APIs and State-History Services Are Configured for Broad Public Exposure

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
node-operation.md:45
Finding

Privileged Node Software and Blockchain Snapshots Are Consumed Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
backend-patterns.md:42
Finding

Security-Critical npm Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (85)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `metalx-dex.md` | DEX integration | MetalX DEX API reference, order format, error codes |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `metalx-dex.md` | DEX integration | MetalX DEX API reference, order format, error codes |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `payment-patterns.md` | Commerce/payments | Payment links, invoicing, POS, subscriptions |

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 · backend-patterns.md (reported line 47)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 67)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 205)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 554)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 571)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 839)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · backend-patterns.md (reported line 881)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · metalx-dex.md (reported line 431)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · payment-patterns.md (reported line 520)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

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 · token-creation.md (reported line 513)May include surrounding context.

md
# Pick the network
proton chain:set proton              # or proton-test

# Add your blockchain key to the encrypted keychain
proton key:add                       # interactive — paste key once, stored encrypted

# Verify

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

This section explicitly states that A2A still uses an EOSIO key in process via A2A_SIGNING_KEY. Even though it recommends a limited-blast-radius custom permission, keeping any signing key in process memory in an agent-oriented system creates a realistic secret-exposure path through logs, tool access, prompt injection, crashes, or memory disclosure.

Content

Scanner excerpt · backend-patterns.md (reported line 578)May include surrounding context.

md
- **The proton CLI itself can be attacked.** You trust whatever guarantees the CLI provides for its keychain — that's out of scope for the agent project.
- **A2A still uses an EOSIO key in process.** Agent-to-agent signing needs to sign arbitrary messages, which the proton CLI doesn't expose. Use a separate `A2A_SIGNING_KEY` registered on a custom permission with no on-chain powers — limited blast radius (reputation only, not funds).
- **OS-level isolation isn't perfect.** Root on the agent host can read the keychain. This refactor solves the application-level attack surface, not the host-level one.

### Constrained environments (serverless, CI, ephemeral containers)

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 · backend-patterns.md (reported line 834)May include surrounding context.

Environment Configuration

.env Template

bash
# XPR Network Configuration

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 · backend-patterns.md (reported line 887)May include surrounding context.

md
'XPR_PRIVATE_KEY is set but is no longer supported.\n' +
      '  1. Install proton CLI: npm i -g @proton/cli\n' +
      '  2. Add your key:        proton key:add\n' +
      '  3. Remove XPR_PRIVATE_KEY from your .env'
    );
  }

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · node-operation.md (reported line 289)May include surrounding context.

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Set to performance

echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Make persistent (add to /etc/rc.local or systemd service)

text

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · testing-debugging.md (reported line 52)May include surrounding context.

md
});

  beforeEach(async () => {
    // Reset state between tests
    blockchain.resetTables();
  });

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · troubleshooting.md (reported line 334)May include surrounding context.

Solutions:

bash
# Clean and rebuild
rm -rf assembly/target
npm run build

# Check for TypeScript errors

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guide provides live updateauth, deleteauth, and related permission-management examples that can directly alter account authority, but it does not prominently warn about account lockout, accidental privilege loss, or irreversible loss of control if misapplied. In a blockchain account-permission context, users commonly copy commands verbatim, so omission of explicit safety guidance materially increases the risk of self-inflicted account compromise or denial of access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The examples perform real state-changing blockchain operations such as token transfers without an explicit warning that they can move real assets on mainnet and are irreversible once confirmed. In a developer skill likely to be consumed by automation agents, omission of that warning increases the chance of accidental fund movement during copy-paste use or autonomous execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The scheduled task examples automatically call state-changing contract actions on a cron schedule, but they do not clearly warn that these operations will execute unattended and can repeatedly alter chain state or spend resources. In an agent/backend context, unattended execution materially raises risk because a logic bug, bad RPC data, or misconfiguration can trigger repeated irreversible transactions.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · cli-reference.md (reported line 17)May include surrounding context.

If you get permission errors on Mac/Linux:

bash
sudo chown -R $USER /usr/local/lib/node_modules
sudo chown -R $USER /usr/local/bin

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · cli-reference.md (reported line 18)May include surrounding context.

If you get permission errors on Mac/Linux:

bash
sudo chown -R $USER /usr/local/lib/node_modules
sudo chown -R $USER /usr/local/bin

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · node-operation.md (reported line 139)May include surrounding context.

If you get permission errors on Mac/Linux:

bash
sudo chown -R $USER /usr/local/lib/node_modules
sudo chown -R $USER /usr/local/bin

Static analysis

No suspicious patterns detected.