T09 · Insecure Skill Coding Practices
- Location
scripts/query-log.sh:42- Finding
Arbitrary JavaScript Execution Through CLI Query Filters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/query-log.sh:42Arbitrary JavaScript Execution Through CLI Query Filters
server/index.html:377Stored Cross-Site Scripting Through Unvalidated Transaction Status
| Time | Service | Amount | Skill | To ...[truncated 2777 chars] |
|---|
server/index.html:499Stored Cross-Site Scripting Through Tracked-Tool Inline Event Handlers
server/server.js:39Unauthenticated Localhost API Allows Cross-Site State Changes and Unbounded Request Bodies
server/patterns-sync.js:115Unsigned Remote Regular Expressions Are Evaluated in the Tool-Call Detection Path
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.
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.
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.
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.
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.
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.
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.
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.
Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.
// 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 were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<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 parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
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" }
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.
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.
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.
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.
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.
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.
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.
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.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
SUMMARY=""
BY_SERVICE=false
BY_SKILL=false
VERIFY=false
while [[ $# -gt 0 ]]; do
case "$1" in
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.
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.
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.
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.
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.