Back to skill

Security audit

AI Investment Analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is not a backdoor, but it exposes a ClawHub token and presents mock financial outputs as investment guidance while logging analyses locally.

Review carefully before installing. Do not rely on this skill for real investment decisions unless it is changed to use verified market data, clear timestamps, validated methods, and prominent financial-risk disclaimers. The exposed ClawHub token should be revoked, removed from all distributed copies, and audited. Users should also know that analysis requests may be saved locally in analysis_log.json.

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
publish-manual.txt:23
Finding
Plaintext ClawHub Authentication Token Embedded in Documentation<![CDATA[ ## Vulnerability Details **File Location**: `publish-manual.txt:23-26` **Vulnerability Type**: Hardcoded authentication credential **Risk Level**: High ### Vulnerable Code ```text ### 方法1:使用ClawHub网站发布 1. 访问 https://clawhub.com 2. 登录账户(使用token:clh_stbFXRYc9RTR1Ck7e940tJ1e4AN0EU8X5S_MhoC8MFM) 3. 点击 "Add Skill" 或 "Publish Skill" ``` ### Technical Analysis The publishing guide contains a plaintext value explicitly identified as a ClawHub login token. Because this file is distributed with the project, every person or system that can download, clone, inspect, or receive the package can recover the credential. Authentication tokens are bearer credentials: possession may be sufficient to exercise the permissions assigned to the associated account. The exposure is therefore security-relevant even if the token has since expired or been revoked. Removing the token from the current file alone is also insufficient if it remains in repository history, cached packages, release archives, CI logs, or mirrors. ### Attack Path 1. An attacker downloads or obtains a copy of the project package. 2. The attacker opens `publish-manual.txt`. 3. The attacker extracts the plaintext ClawHub token from line 25. 4. The attacker submits the token to the relevant ClawHub authentication interface. 5. If the token remains active, the attacker performs any account or publishing operations authorized by the token. No additional code execution or local-system compromise is required to recover the credential. ### Impact Assessment A successful attacker may obtain the ClawHub privileges granted to the exposed token. Depending on its actual scope, this could include: - Accessing the associated ClawHub account. - Publishing or modifying Skills under the account. - Impersonating the account owner in supported workflows. - Tampering with distributed package content or metadata. - Performing other account operations permitted by the token. The exact privilege scope cannot be esta ...[truncated 127 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Revoke the exposed token immediately through ClawHub. 2. Generate a replacement token with the minimum permissions and shortest practical lifetime. 3. Remove the token from `publish-manual.txt` and replace the instruction with an interactive login flow or an environment-variable reference. 4. Purge the credential from Git history, release archives, package registries, mirrors, build artifacts, and CI/CD logs. 5. Store future credentials in a dedicated secret manager or protected CI secret store. 6. Never commit `.env` files or credential-bearing configuration files. 7. Add automated secret scanning to pre-commit hooks and CI pipelines. 8. Review ClawHub account and publication activity for unauthorized operations performed using the exposed token. 9. Rotate any related credentials if the token could have been reused or exposed alongside other account secrets. ]]>

other

Warning
Location
analyzer.js:107
Finding
Fabricated Market Data and Arbitrary Logic Presented as Actionable Investment Analysis<![CDATA[ ## Vulnerability Details **File Location**: `analyzer.js:107-126` **Related Locations**: `analyzer.js:7-62`, `advanced-predictions.js:96-122`, `README.md:8-18`, `SKILL.md:20-26`, `SKILL.md:104-107` **Vulnerability Type**: Misleading financial-analysis integrity failure **Risk Level**: Medium ### Vulnerable Code ```js // ROI预测 const roiPredictions = { "stock": "预计年回报率12-18%", "crypto": "预计年回报率±20-35%", "indices": "预计年回报率8-12%", "realEstate": "预计年回报率6-10%" }; // 分析结果 const analysis = { asset: asset, assetType: assetType, currentPrice: `${currentPrice}`, trend: trendAnalysis[period] || "稳定", riskLevel: riskAssessment[assetType] || "中等", recommendation: currentPrice > 150 ? "建议买入" : "谨慎观望", roi: roiPredictions[assetType] || "预计年回报率10%", analysisTime: new Date().toISOString(), confidenceLevel: 75 }; ``` The underlying data retrieval also silently substitutes a fabricated value for unknown assets: ```js const priceMap = mockPrices[marketType] || mockPrices.stocks; const price = priceMap[symbol] || 100; return price; ``` The separate advanced-prediction module similarly uses fixed arithmetic, randomness, and hardcoded bullish output: ```js function predictPrice(data) { // 基于历史数据预测 return data.prices.length ? data.prices[data.prices.length-1] * 1.15 : 100; } function calculateRiskScore(data) { // 风险评分 return Math.floor(Math.random() * 10) + 1; } function generateAIInsights(data) { return [ "Market sentiment analysis suggests bullish trend", "Technical indicators show upward momentum", "Fundamental metrics indicate strong growth", "Machine learning predicts 15% price increase in next quarter" ]; } ``` ### Technical Analysis The application generates investment recommendations from static mock prices and a single arbitrary threshold: any resolved price above `150` produces a buy recommendation. The reported confidence level is always `75`, and expected return ranges are hardcoded by asset type ...[truncated 2375 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Display a prominent runtime warning on every report stating that mock data and demonstration logic are being used. 2. Do not produce actionable buy, hold, or sell recommendations while operating in simulation mode. 3. Reject unknown symbols instead of silently assigning a default price of `100`. 4. Include the data source, retrieval timestamp, market, currency, and delay status with every price. 5. Replace fixed confidence and ROI values with documented, validated calculations or omit them. 6. Remove claims of machine learning, Monte Carlo simulation, value-at-risk analysis, and real-time data until those capabilities are implemented and tested. 7. Replace random risk scores and hardcoded bullish insights with deterministic, auditable methodology. 8. Validate all asset and period inputs and return explicit unsupported-input errors. 9. Add backtesting, model validation, uncertainty bounds, and reproducible test cases before issuing forecasts. 10. Add clear financial-risk and non-advisory disclosures to the CLI output and documentation. 11. Separate demonstration mode from production mode through explicit configuration, and fail closed if production data sources are unavailable. 12. Obtain appropriate financial, legal, and regulatory review before marketing the tool as an investment decision system. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description presents the skill as an AI-powered investment analysis assistant with analytical, advisory, forecasting, and optimization capabilities. However, the supplied code only implements an internationalization helper containing static translation dictionaries and simple functions for key translation and localized output formatting. It does not fetch market data, analyze assets, assess risk, generate recommendations from data, or optimize strategies. While the strings reference investment concepts, that is only UI/supporting text, not the substantive behavior described. Therefore, the code chunk’s actual purpose is materially different from the declared purpose.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The manual embeds a live-looking ClawHub login token and explicitly instructs operators to use it to authenticate. Exposed credentials are a direct secret-disclosure issue and are unrelated to the investment-analysis function of the skill, which makes this especially suspicious and dangerous because anyone reading or indexing the file could reuse the token for unauthorized account access or publishing actions.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown file uses Chinese for all substantive feature descriptions, which imposes a specific language on users without any opt-in or explanation. Under the language/locale policy rule, this is a natural-language policy concern because the file does not indicate that the skill is region-specific or provide an alternative language option.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This markdown file contains user-facing instructions and promotional content exclusively in Chinese, and there is no indication that the skill is region-specific or that users can choose another language. That can violate language/locale policy when a skill imposes a language without explicit opt-in or justification.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README presents the skill as providing investment analysis, market prediction, and portfolio optimization without any visible disclaimer about financial risk, uncertainty, or that outputs should not be treated as definitive investment advice. In a finance-focused skill, this omission can mislead users into over-trusting model outputs for real-money decisions, increasing the chance of harmful financial losses or inappropriate reliance.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly offers investment analysis, forecasts, and recommendations but provides no disclaimer that outputs are informational only and may be inaccurate, incomplete, or unsuitable for a user's financial situation. In a finance context, users may over-rely on the tool's outputs and make harmful financial decisions, especially because the description uses authoritative language such as risk assessment, optimization, and AI prediction.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The manifest description is written entirely in Chinese and presents the skill as a Chinese-language assistant, but there is no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking region. This creates a natural-language locale policy concern because the skill appears to impose a specific language without opt-in or justification.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file's human-readable comments are entirely in Chinese, which imposes a specific language on maintainers or users reading the skill source. There is no indication that this language choice is optional, configurable, or justified by a region-specific requirement, which matches the locale-policy concern for natural-language content.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The JSON values for trend, risk level, recommendation, and ROI are written in Chinese, indicating a fixed language choice in the skill output. There is no evidence in this file of user language selection or a documented reason for enforcing that locale, which creates a natural-language policy concern.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The skill advertises real-time investment analysis, but the implementation uses hardcoded mock prices and fabricated trend/ROI outputs. In an investment-advice context, this can mislead users into making financial decisions based on false or stale information, which is materially dangerous even without code execution or classic injection.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The comment claims the function obtains real-time financial data, but the code actually returns mock data. This mismatch increases the risk of developer or user trust in nonexistent live-data behavior, causing deceptive outputs in a high-stakes financial domain.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Natural-language strings throughout the skill, including comments, console output, and CLI usage text, are exclusively in Chinese. This effectively forces a specific language without any user opt-in or documented region-specific justification, which matches the language/locale policy violation criteria.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill writes user-provided investment analysis history to disk without notice or consent. Investment interests and portfolio-related inputs can be sensitive financial profiling data, so undisclosed persistence creates privacy risk and potential exposure to other local users or processes.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file uses Chinese field names and descriptions throughout, including usage examples and recommendations, which effectively forces a specific language for users of the skill. The policy allows fixed locale only when the constraint is explicitly documented and justified, but this JSON provides no opt-in or stated region-specific limitation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill metadata presents the skill name, description, and authoring context entirely in Chinese, with no indication that users can select another language or that the skill is intended only for a Chinese-language audience. Under the policy, forcing a language or locale without opt-in or clear regional justification is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language without user opt-in. This publication guide presents all instructions in Chinese and does not indicate that users may choose another language or that the skill is limited to a Chinese-speaking region.

Description-Behavior Mismatch

Low
Confidence
76% confidence
Finding
The manifest focuses on analysis, risk assessment, and investment strategy advice, but the implementation also persists every analysis result to a local JSON log file. Persistent storage is not necessarily implied by the stated purpose and represents behavior beyond the described assistant functionality.

Static analysis

No suspicious patterns detected.