Back to skill

Security audit

Claw Screener

Security checks for vulnerabilities and agentic risk

Overview

The stock screener is mostly coherent, but its setup instructions ask users to execute an unverified remote Bun installer, so it needs review before installation.

Review the Bun installation step carefully. Prefer installing Bun through a trusted package manager or a pinned, verified release instead of running curl-to-bash or an immediately executed PowerShell download. Expect the skill to make public market-data requests and create local watchlist/cache files; do not treat its stock rankings as financial advice.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:240
Finding
Unverified Remote Bun Installer Execution## Vulnerability Details **File Location**: `SKILL.md:240-243` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Complete Code Snippet**: ```bash # macOS/Linux curl -fsSL https://bun.sh/install | bash # Windows (PowerShell) iwr https://bun.sh/install -outfile "install.ps1"; ./install.ps1 ``` ### Technical Analysis The installation instructions retrieve mutable scripts from `https://bun.sh/install` and execute them without pinning an immutable version or verifying a checksum or digital signature. The Unix command pipes the response directly into Bash, while the Windows command downloads the response and immediately executes it with PowerShell. Although `bun.sh` is presented as Bun's official installation endpoint, its response is external to the audited package and can change after review. Consequently, the code ultimately executed is not represented by the reviewed project contents. A compromise of the endpoint, its distribution infrastructure, or the network trust path could substitute arbitrary commands. This behavior is not required for the stock screener itself. Installing the documented runtime is a legitimate prerequisite, but executing an unverified remote installer grants substantially broader capability than the minimum needed to explain that prerequisite. ### Attack Path 1. A user or automated agent follows the installation instructions in `SKILL.md`. 2. The command requests a mutable script from `https://bun.sh/install`. 3. The response is not checked against a pinned checksum or trusted signature. 4. Bash or PowerShell executes the response with the invoking user's privileges. 5. If the remote response has been maliciously replaced, it can execute arbitrary commands, read user-accessible files, install additional software, or modify the user's environment. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the ...[truncated 484 chars]
Remediation
## Remediation Suggestions - Remove instructions that pipe network responses directly into a shell or immediately execute downloaded scripts. - Prefer a trusted operating-system package manager or another installation channel that performs package integrity and provenance verification. - If a standalone installer is necessary, pin an explicit Bun release and immutable artifact URL. - Publish the expected cryptographic checksum or signature and require verification before execution. - Download the installer to a local file, inspect or verify it, and only then execute it as a separate deliberate step. - Explicitly instruct users not to run the installer with elevated privileges unless a documented installation step strictly requires them. - Keep runtime installation separate from Skill execution so the stock screener runs only with ordinary user privileges.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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
Findings (57)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared description emphasizes a combined strategy: Williams %R oversold screening plus Buffett-style fundamental analysis across US and Thai markets. In the supplied code, there is no technical indicator logic, no Williams %R computation, no price-history retrieval needed for such an indicator, and no screening across a universe like the S&P 500 or SET. Instead, the main behavior is per-ticker analysis. For US stocks, it resolves a ticker to SEC CIK, pulls SEC company facts, supplements free cash flow from Yahoo Finance, and runs a FormulaEngine for Buffett-style scoring. For Thai stocks, it only fetches Yahoo Finance quote summary data and formats metrics such as P/E, dividend yield, ROE, ROA, margins, analyst rating, and 52-week range. That is materially different from the declared combined screener purpose, especially because the Williams %R component is entirely absent and the Thai path is not clearly Buffett-style formula analysis.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The code is clearly related to stock screening and does support US and Thai/Bangkok markets, so the domain is aligned. However, the declared centerpiece—combining Williams %R oversold signals with Buffett-style fundamental analysis—is not what the code does. There is no Williams %R computation, no technical oversold screening logic, and no use of technical trigger conditions. Instead, the code fetches Yahoo Finance fundamentals and historical data, computes revenue/net income/EPS growth, ROIC, free cash flow, buyback/share-count change, operating margin, dividend yield versus 5-year average, and a DCF estimate, then ranks/filter stocks with a custom 'Carlson' score. Additionally, it reads/writes a local sql.js database cache file, which is an undeclared resource access. Because the primary screening methodology materially differs from the description, this is a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The supplied code does not implement a stock screener or any investment-analysis logic. Instead, it provides infrastructure components for caching OHLC price data and SEC data in local SQL.js databases persisted to disk. While such caching could support a screener, this chunk’s actual behavior is data storage/retrieval with TTL handling, not screening US/SET stocks, calculating Williams %R, or performing Buffett-style fundamentals analysis. This is a material mismatch in primary purpose and capabilities.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description claims a combined stock screener using both Williams %R oversold signals and Buffett-style fundamentals across US and Thai markets. This code chunk only performs fundamental ratio/quality checks on a supplied Financials dataset. There is no computation involving historical prices, highs/lows, Williams %R, ticker universe screening, exchange-specific handling, or market support logic. While the Buffett-style fundamental portion is consistent with the description, the declared primary capability is broader and materially different from what this code actually does.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description promises a stock screener with technical and fundamental analysis across specific markets. The supplied code chunk does not implement screening, indicator computation, or fundamental analysis. Its sole function is retrieving historical price data from Yahoo Finance and packaging it into OHLC records, including batch fetching support. While price retrieval could support a screener, this chunk by itself materially underdelivers relative to the declared purpose.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared description promises a combined technical-and-fundamental stock screener with support for specific markets. The supplied code chunk is much narrower: it computes Williams %R, computes an EMA on numeric data, interprets Williams %R states, and runs a sample main block with synthetic data. There is no evidence of Buffett-style fundamentals (e.g., valuation, earnings, balance-sheet checks), no universe screening across stocks, and no market-specific integrations for S&P 500 or SET. While Williams %R oversold interpretation aligns partially with the description, the overall implemented behavior is materially incomplete and differs from the declared primary purpose.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The description says the skill combines Williams %R oversold signals with Warren Buffett-style fundamental analysis. However, this code only implements a technical oversold scan using price data and Williams %R, plus an EMA and formatting/output logic. There is no evidence of fetching financial statements, valuation metrics, quality/profitability measures, or any other Buffett-style fundamental criteria. The supported markets do generally align with the description (US and Thai/BK), so the main mismatch is that the actual functionality is materially narrower than declared.

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/screening.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/technicalOnly.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/technicalOnly.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/technicalOnly.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/technicalOnly.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/analyze.ts <ticker> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/analyze.ts <ticker> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/analyze.ts <ticker> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/analyze.ts <ticker> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/analyze.ts <ticker> [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/compoundingMachine.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
bun run src/compoundingMachine.ts [options]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

No suspicious patterns detected.