Back to skill

Security audit

Karpak life register

Security checks for vulnerabilities and agentic risk

Overview

The skill’s wallet registration purpose is coherent, but it needs Review because its local wallet bridge is unauthenticated/cross-origin and its instructions can steer an unspecified run to mainnet.

Install only after reviewing these risks carefully. The skill will connect a wallet, send wallet/profile data to Karpak/SBT services, request a signature, and may ask you to confirm a gas-spending mainnet transaction. Do not let the agent infer mainnet; choose testnet or mainnet explicitly, and prefer a version that adds a per-session bridge token/origin checks and fixes the conflicting mainnet example.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
bridge.mjs:396
Finding

Unauthenticated Cross-Origin Wallet Bridge Permits Workflow Interference and Sensitive Data Disclosure

Content
View full analysis
{ log('>>>', `Bridge server listening on ${this.base}`); resolve(); }); ``` ```js _handle(req, res) { res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type'); if (req.method === 'OPTIONS') { res.writeHead(204); res.end(); return; } const url = new URL(req.url, this.base); if (url.pathname === '/' && req.method === 'GET') { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(BRIDGE_HTML); return; } if (url.pathname === '/next-action' && req.method === 'GET') { if (this._actionQueue.length > 0) { const action = this._actionQueue.shift(); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify(action)); } else { let settled = false; const waiter = (action) => { if (settled) return; settled = true; res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify(action)); }; this._actionWaiters.push(waiter); req.on('close', () => { if (!settled) { settled = true; const idx = this._actionWaiters.indexOf(waiter); if (idx !== -1) this._actionWaiters.splice(idx, 1); } }); setTimeout(() => { if (!settled) { settled = true; const idx = this._actionWaiters.indexOf(waiter); if (idx !== -1) this._actionWaiters.splice(idx, 1); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ action: 'ping' })); } }, 30000); } return; ...[truncated 3703 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:49
Finding

Contradictory Environment Instructions May Cause Unintended Mainnet Transactions

Content
View full analysis
karpak-life-register > > Please register my wallet on Karpak Life and mint the Soulbound Token. > > Registration details: > > Nickname: test > Twitter handle (no @): abc > Identity type: AI Agent > > Run the register-and-mint script with these parameters. Open browser bridge when wallet interaction is needed. Report the final result when done. You run: ```bash node ${HERMES_SKILL_DIR}/register-and-mint.mjs --nickname=test --twitter=abc --identity=IDENTITY_TYPE_AGENT --env=mainnet ``` ``` ### Technical Analysis The normative instructions correctly require an explicit choice between testnet and mainnet. However, the included execution example contradicts that rule by supplying `--env=mainnet` when the example user did not select an environment. Examples in Skill documentation are operational guidance for an AI agent. The contradiction creates ambiguity and may lead the Agent to infer that mainnet is the implicit choice despite the explicit fail-closed requirement elsewhere in the document. The executable itself correctly rejects a missing environment. The unsafe condition is introduced when the Agent constructs a mainnet command based on the contradictory example. ### Attack Path 1. A u ...[truncated 1225 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill can read environment variables and invoke Node/terminal behavior, but it does not declare any explicit tool scope or permissions boundaries. In a skill that performs blockchain registration and wallet-adjacent flows, undeclared capabilities reduce transparency and can enable unintended access to secrets or host configuration if the implementation evolves or is misused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The client sends an authentication token via the X-Session-Token header in updateProfile and getCredential, which is a safety-relevant network operation involving sensitive credential material. In this file there is no confirmation prompt, logging, or explanatory comment/docstring warning that user credential data will be transmitted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The code transmits walletAddress and twitterUsername to cfg.sbtUrl over HTTP(S), which can affect user privacy and is not accompanied here by any prompt, print/log notice, or explanatory comment. Because this file contains the transmission logic but no visible disclosure, users may not realize their account-linked data is being sent to external services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The bridge page posts wallet-derived data such as address, signatures, and transaction hashes to an unauthenticated local HTTP endpoint, and the server accepts requests from any origin due to Access-Control-Allow-Origin: *. A malicious local webpage could potentially interact with the bridge, race legitimate submissions, or inject spoofed /submit data because there is no session secret, origin check, or CSRF-style binding between the opened page and the local server.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a skill that automates Karpak Life registration and SBT minting, which reasonably implies wallet interaction and transaction submission. However, this file also implements an embedded bridge web server and invokes OS-specific browser-launch commands via child_process, adding local server hosting and subprocess execution capabilities that are not stated in the skill purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The instructions mandate extracting parameters from the user's message using fixed English field names such as "Nickname," "Twitter," "Identity," and "Environment," but do not offer any language or locale choice. This creates a natural-language policy concern because the skill behavior assumes English-language inputs without documenting opt-in or alternatives.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The openFlow method launches a system browser through a shell command using execAsync, which is a subprocess operation covered by this rule. Although there is a log message indicating the browser is being opened, the file does not include any broader warning or explanatory comment about invoking an external system command on the user's machine.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.