Back to skill

Security audit

Spend Ledger

Security checks for vulnerabilities and agentic risk

Overview

The skill’s payment-tracking purpose is genuine and mostly disclosed, but its broad automatic hooks and insecure localhost dashboard create review-worthy risk around financial metadata and agent behavior.

Review before installing. This skill can observe tool calls, persist spending and request metadata, and block duplicate-looking payment calls. Only use it if you are comfortable with a local payment ledger and dashboard, disable community pattern sync if you need offline/reviewed behavior, avoid exposing sensitive prompts in payment metadata, and do not run the dashboard while browsing untrusted sites until the localhost API has authentication/CSRF protections and stored-XSS fixes.

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
scripts/query-log.sh:42
Finding

Arbitrary JavaScript Execution Through CLI Query Filters

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
server/index.html:377
Finding

Stored Cross-Site Scripting Through Unvalidated Transaction Status

Content
View full analysis
No transactions found'; return; } el.innerHTML = `
TimeServiceAmountSkillTo ...[truncated 2777 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
server/index.html:499
Finding

Stored Cross-Site Scripting Through Tracked-Tool Inline Event Handlers

Content
View full analysis
t.tool_name_pattern === data.tool_name_pattern ); if (existing) { json(res, { error: "pattern already tracked" }, 409); return; } const entry = { tool_name_pattern: data.tool_name_pattern, description: data.description || "", category: data.category || null, added_at: new Date().toISOString(), }; tools.push(entry); saveTrackedTools(tools); ``` The dashboard embeds the pattern inside an inline JavaScript string: ```js el.innerHTML = tools.map(t => `
${esc(t.tool_name_pattern)} ${esc(t.description || '')}${t.category ? ' [' + esc(t.category) + ']' : ''}
Remove
`).join(''); ``` The escaping function only performs HTML escaping: ```js function esc(s) { if (!s) return ''; return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,'''); } ``` ### Technical Analysis HTML escaping is not sufficient for data embedded inside JavaScript contained in an HTML attribute. For example, an apostrophe becomes `'`. During HTML parsing, the browser decodes that entity back to an apostrophe in the attribute value. The resulting `onclick` handler is ...[truncated 1304 chars]
Remediation
View remediation
removeTrackedTool(t.tool_name_pattern)); ``` ]]>

T09 · Insecure Skill Coding Practices

Error
Location
server/server.js:39
Finding

Unauthenticated Localhost API Allows Cross-Site State Changes and Unbounded Request Bodies

Content
View full analysis
{ const chunks = []; req.on("data", (c) => chunks.push(c)); req.on("end", () => resolve(Buffer.concat(chunks).toString())); req.on("error", reject); }); } ``` Mutation routes parse JSON regardless of request content type, Origin, or authentication: ```js if (req.method === "POST") { const body = await readBody(req); let data; try { data = JSON.parse(body); } catch { json(res, { error: "invalid JSON" }, 400); return; } if (pathname === "/api/transactions") { if (!data.service?.name && !data.service?.url) { json(res, { error: "service.name or service.url required" }, 400); return; } data.source = "manual"; const record = appendTransaction(data); if (!record) { json(res, { error: "duplicate transaction (same tx_hash or idempotency_key)" }, 409); return; } json(res, { transaction: record }, 201); return; } ``` The tracked-tool POST and DELETE routes are protected by the same absent access controls: ```js if (req.method === "DELETE") { if (pathname.startsWith("/api/tracked-tools/")) { const pattern = decodeURIComponent(pathname.slice("/api/tracked-tools/".length)); const tools = loadTrackedTools(); const idx = tools.findIndex((t) => t.tool_name_pattern === pattern); if (idx === -1) { json(res, { error: "pattern not found" }, 404); return; } tools.splice(idx, 1); saveTrackedTools(tools); json(res, { removed: pattern }); return; } } ``` ### Technical Analysis Binding a service to `127.0.0.1` prevents direct access from other machines ...[truncated 2091 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
server/patterns-sync.js:115
Finding

Unsigned Remote Regular Expressions Are Evaluated in the Tool-Call Detection Path

Content
View full analysis
t.tool_name_pattern)); const tracked = [ ...local, ...community.filter((c) => !localPatterns.has(c.tool_name_pattern)), ]; if (!tracked.length) return null; const match = tracked.find((t) => { try { return new RegExp(t.tool_name_pattern, "i").test(toolName); } catch { return toolName.toLowerCase() === t.tool_name_pattern.toLowerCase(); } }); ``` Synchronization is enabled by default when the plugin loads: ```js const cfg = loadConfig(); if (cfg.sync_community_patterns !== false) { syncPatterns(); setInterval(syncPatterns, 24 * 60 * 60 * 1 ...[truncated 2176 chars]
Remediation
View remediation
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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (41)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Providing an HTTP dashboard/API server surface without prominently disclosing that network-listening behavior expands the attack surface beyond a simple ledger utility. Even if bound to localhost, a local web server can expose sensitive spending data to other local processes or be misconfigured later.

Content

No source excerpt is available for this finding.

Unvalidated Output Injection

High
Category
Output Handling
Confidence
100% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · server/detectors.js (reported line 375)May include surrounding context.

js
// For non-JSON results, extract amount/currency from plain text
  if (common.amount === "0") {
    const textMatch = PLAIN_TEXT_AMOUNT.exec(resultStr) || PLAIN_TEXT_AMOUNT.exec(argsStr);
    if (textMatch) {
      common.amount = textMatch[1];
      common.currency = textMatch[2].toUpperCase();

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · server/index.html (reported line 190)May include surrounding context.

html
<div id="tab-by-skill" class="tab-content"></div>
<div id="tab-daily" class="tab-content"></div>
<div id="tab-track" class="tab-content">
  <!-- Manual transaction -->
  <div class="form-section">
    <h3>Log a transaction manually</h3>
    <p class="hint" style="margin-bottom:10px">Use this for payments the auto-detection missed.</p>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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 · test/test.js (reported line 445)May include surrounding context.

js
assert.equal(data.tools[0].tool_name_pattern, "my_custom_pay.*");
  });

  it("DELETE /api/tracked-tools/:pattern removes a pattern", async () => {
    const res = await fetch(
      `http://127.0.0.1:${port}/api/tracked-tools/${encodeURIComponent("my_custom_pay.*")}`,
      { method: "DELETE" }

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill declares no explicit tool scope or permissions despite describing capabilities that involve network access, local files, and process/server management. In an agent environment, undeclared capabilities reduce reviewability and can allow the skill to perform sensitive actions the operator did not clearly consent to.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill claims to automatically detect payments made through virtually any tool or mechanism, which is an extremely broad activation scope for a payment-adjacent logger. Overbroad detection can capture unrelated tool activity, log sensitive data unexpectedly, and create false confidence that all payments are tracked or deduplicated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Heuristic triggers based on generic names like 'checkout', 'purchase', or 'buy' and loosely defined monetary/confirmation text are prone to false positives. In this skill context, a false positive can cause sensitive prompts, service names, and transaction-like metadata to be logged or influence duplicate-payment logic incorrectly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Fetching community patterns from an external API introduces unnecessary outbound communication for a ledger that users may reasonably expect to be local-first. Because the skill handles payment-related metadata, even indirect network interaction increases privacy exposure and opens a supply-chain path if the remote patterns are compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly states it logs service details, transaction metadata, triggering skill, user request, and input hash, but the top-level description does not provide a clear privacy warning or minimization guarantees. This is dangerous because user requests and payment metadata may contain confidential business intent, personal data, or financial details that become persistently stored and potentially exposed via direct file reads or the dashboard.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Using the bare tool name pattern pay is overly permissive and can match unrelated tools, commands, or ordinary terminology. In a ledger skill that auto-detects and deduplicates payments, this can cause false payment classification, corrupt spend history, and potentially trigger incorrect duplicate-payment prevention logic that blocks legitimate future payments.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

A catch-all detector that applies to any tool substantially widens the trust boundary and allows unrelated tool output containing x402-like text or headers to be misclassified as a payment. Because this skill is designed to auto-detect payments across all tools and prevent duplicates, broad matching can poison the ledger, hide real payment state, or interfere with autonomous agent decision-making around whether a payment has already occurred.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script explicitly documents and accepts fields such as context.user_request, context.tool_name, and context.tool_args_summary, then forwards them to the transaction logger without any user-facing warning, minimization, or confirmation step. In an agent setting, those fields can contain sensitive prompts, secrets, API arguments, or personal data, so persisting them to disk increases privacy and data-retention risk even if the script is otherwise functioning as intended.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/query-log.sh (reported line 26)May include surrounding context.

sh
SUMMARY=""
BY_SERVICE=false
BY_SKILL=false
VERIFY=false

while [[ $# -gt 0 ]]; do
  case "$1" in

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The detector trusts user/community-supplied tool name patterns and elevates any matching tool call into a payment record without requiring independent payment evidence such as amount, transaction identifiers, or payment-specific result markers. In a spend-ledger skill, this can be abused to forge or misclassify arbitrary tool usage as payments, undermining ledger integrity and potentially triggering duplicate-payment prevention or audit logic on false data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Although there is a checkbox mentioning maintainers, the UI does not provide a clear warning about the security/privacy implications of transmitting entered tool patterns and descriptions. Users may not understand that these values can expose internal tool names, regexes, or workflow details, making accidental data disclosure more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The UI explicitly offers to send user-entered tracked tool patterns to maintainers, which introduces outbound data sharing beyond the stated purpose of a local spending ledger. In an agent environment, tool names/patterns can reveal internal capabilities, vendor choices, workflows, or sensitive operational details, so this creates a real information disclosure risk even if optional.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The client code includes a send_to_maintainers path for user-supplied tool metadata, confirming that information entered for local tracking may be shared externally. Because this skill is supposed to manage spending history, exporting tool-identification metadata to maintainers is a scope expansion that can leak private agent/tooling information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file adds community pattern download and submission behavior that is not clearly necessary for a tamper-evident payment ledger, creating hidden data-flow and supply-chain risk beyond the advertised scope. Even if intended as a product feature, undeclared scope expansion is dangerous because it can silently introduce remote influence over detector behavior and user-data sharing expectations.

Content

No source excerpt is available for this finding.