Back to skill

Security audit

nansen-alerts-webhook-listener

Security checks for vulnerabilities and agentic risk

Overview

The scanners report a webhook listener with an unpinned optional tunnel command and an undisclosed forwarding capability; the verdict is suspicious, with medium confidence, because of these security and disclosure concerns.

Consider the unpinned `npx localtunnel` command and the optional forwarding of alert payloads to a configurable OpenClaw endpoint before installing. The scanner coverage is partial: static tool-misuse analysis was degraded, and no components were fully inspected, so the findings do not provide complete assurance.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The core webhook reception and signature verification match the description. However, optional OpenClaw forwarding introduces a distinct outbound data transfer and agent integration not disclosed in the declared purpose. Although a comment describes the gateway as local, the configured URL is not restricted to localhost. Separately, the code binds to 127.0.0.1 and contains no tunnel setup, so the advertised public-tunneling functionality is absent from this chunk.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
| | **ngrok** (recommended) | **localtunnel** |
|---|---|---|
| Stability | Stable — persistent connections with keepalive | Flaky — free relay drops idle connections without warning, tunnels die randomly |
| Install | `brew install ngrok` + free account at ngrok.com | Zero install (`npx localtunnel`) |
| HTTPS | Yes | Yes |
| Auth required | Yes (free authtoken from ngrok.com) | No |

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 · SKILL.md (reported line 91)May include surrounding context.

Write the secret straight to a file that only the user can read, so it never appears in the terminal, the shell history or the transcript:

bash
(umask 077 && node -e "process.stdout.write(require('crypto').randomBytes(32).toString('hex'))" > nansen-webhook-secret.txt)

The server and the alert both read it from this file (WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" for the server, --webhook-secret-stdin < nansen-webhook-secret.txt for nansen alerts). Never log, echo or paste the secret.

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 · SKILL.md (reported line 94)May include surrounding context.

(umask 077 && node -e "process.stdout.write(require('crypto').randomBytes(32).toString('hex'))" > nansen-webhook-secret.txt)

text

The server and the alert both read it from this file (`WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)"` for the server, `--webhook-secret-stdin < nansen-webhook-secret.txt` for `nansen alerts`). **Never log, echo or paste the secret.**

### Step 2: Write the webhook receiver script

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 · SKILL.md (reported line 94)May include surrounding context.

(umask 077 && node -e "process.stdout.write(require('crypto').randomBytes(32).toString('hex'))" > nansen-webhook-secret.txt)

text

The server and the alert both read it from this file (`WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)"` for the server, `--webhook-secret-stdin < nansen-webhook-secret.txt` for `nansen alerts`). **Never log, echo or paste the secret.**

### Step 2: Write the webhook receiver script

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 · SKILL.md (reported line 262)May include surrounding context.

Start the server:

bash
WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" node nansen-webhook-server.mjs

Then start a public tunnel so Nansen's servers can reach it.

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 · SKILL.md (reported line 294)May include surrounding context.

md
The summary MUST include:
1. Confirmation of what was created (the server script path and the secret file path; never the secret itself)
2. The commands to start the server and tunnel (reading the secret from the file)
3. The exact `nansen alerts create` or `nansen alerts update` command they should run, with `--webhook` filled in with the tunnel URL and `--webhook-secret-stdin < nansen-webhook-secret.txt` for the secret (do not put the secret on the command line with `--webhook-secret`; it lands in shell history and the process list) — but leave the alert-specific flags (`--name`, `--type`, `--chains`, etc.) as placeholders for the user to fill in
4. A reminder that the server and tunnel must be running before the alert is created (Nansen validates the webhook endpoint on creation)
5. A note that tunnel URLs are ephemeral and will change on restart

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 · SKILL.md (reported line 310)May include surrounding context.

md
### To start receiving alerts:

1. Start the server (keep this terminal open):
   WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" node nansen-webhook-server.mjs

2. In a new terminal, start the tunnel:
   ngrok http 9477          # recommended

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 · SKILL.md (reported line 323)May include surrounding context.

md
--chains <chains> \
     --webhook 'https://<your-tunnel-url>/webhook' \
     --webhook-secret-stdin \
     [type-specific flags...] < nansen-webhook-secret.txt

   Or add the webhook to an existing alert:
   nansen alerts update <alert-id> \

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 · SKILL.md (reported line 328)May include surrounding context.

md
Or add the webhook to an existing alert:
   nansen alerts update <alert-id> \
     --webhook 'https://<your-tunnel-url>/webhook' \
     --webhook-secret-stdin < nansen-webhook-secret.txt

Note: The tunnel URL changes each time you restart. Update the alert
webhook URL if you restart the tunnel.

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 · SKILL.md (reported line 349)May include surrounding context.

md
| Symptom | Fix |
|---|---|
| "Invalid signature" on every request | Ensure the server and the alert read the **same secret** (the same `nansen-webhook-secret.txt`). Re-run `nansen alerts update <id> --webhook '<url>/webhook' --webhook-secret-stdin < nansen-webhook-secret.txt` after changing it |
| "Failed to send welcome message" on alert create | Start the server and tunnel **before** creating the alert |
| No alerts arriving | Check `nansen alerts list --table` — is the alert enabled? Is the webhook URL correct (includes `/webhook`)? |
| Tunnel URL expired / tunnel died | Restart the tunnel, get the new URL, then `nansen alerts update <id> --webhook '<new-url>/webhook'`. If this keeps happening, switch from localtunnel to ngrok. |

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 · SKILL.md (reported line 349)May include surrounding context.

md
| Symptom | Fix |
|---|---|
| "Invalid signature" on every request | Ensure the server and the alert read the **same secret** (the same `nansen-webhook-secret.txt`). Re-run `nansen alerts update <id> --webhook '<url>/webhook' --webhook-secret-stdin < nansen-webhook-secret.txt` after changing it |
| "Failed to send welcome message" on alert create | Start the server and tunnel **before** creating the alert |
| No alerts arriving | Check `nansen alerts list --table` — is the alert enabled? Is the webhook URL correct (includes `/webhook`)? |
| Tunnel URL expired / tunnel died | Restart the tunnel, get the new URL, then `nansen alerts update <id> --webhook '<new-url>/webhook'`. If this keeps happening, switch from localtunnel to ngrok. |

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 · SKILL.md (reported line 353)May include surrounding context.

md
| "Failed to send welcome message" on alert create | Start the server and tunnel **before** creating the alert |
| No alerts arriving | Check `nansen alerts list --table` — is the alert enabled? Is the webhook URL correct (includes `/webhook`)? |
| Tunnel URL expired / tunnel died | Restart the tunnel, get the new URL, then `nansen alerts update <id> --webhook '<new-url>/webhook'`. If this keeps happening, switch from localtunnel to ngrok. |
| Port already in use | Set a different port: `PORT=9478 WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" node nansen-webhook-server.mjs` and update the tunnel accordingly |

## OpenClaw Integration

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

text
Get the public URL from ngrok's output or its local API:
```bash
curl -s http://127.0.0.1:4040/api/tunnels | node -e "process.stdin.on('data',d=>console.log(JSON.parse(d).tunnels[0]?.public_url))"

The webhook URL is https://<subdomain>.ngrok-free.dev/webhook.

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 · SKILL.md (reported line 304)May include surrounding context.

md
## Webhook listener ready

**Server script:** ./nansen-webhook-server.mjs
**Secret file:** ./nansen-webhook-secret.txt (readable only by you)
**Port:** 9477

### To start receiving alerts:

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 · SKILL.md (reported line 371)May include surrounding context.

Start command (with OpenClaw forwarding)

bash
WEBHOOK_SECRET="$(cat nansen-webhook-secret.txt)" \
OPENCLAW_GATEWAY_URL='http://localhost:3000' \
OPENCLAW_AUTH_TOKEN='<token>' \
node nansen-webhook-server.mjs

MCP server referenced without pinned version: 'npx localtunnel'.

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Although localtunnel is not an MCP server, the recommended unversioned npx invocation can download and execute a changing npm release with the user's privileges. A compromised release could access local files and credentials; selecting the optional localtunnel fallback makes this exposure reachable.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx localtunnel'.

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The executable command npx localtunnel --port 9477 does not constrain the package version and may execute a newly downloaded release. A malicious or compromised release would run with the local user's permissions, independently of the webhook server's HMAC protections.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx localtunnel'.

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The user-facing summary repeats the unpinned npx command, so following the documented next steps can execute an unreviewed npm release. This is another occurrence of the same supply-chain issue, not an independent vulnerability or an MCP-specific problem.

Content

No source excerpt is available for this finding.