Description-Behavior Mismatch
- Category
- MCP Tool Poisoning
- Confidence
- 99% confidence
- Finding
声明用途仅涉及股票行情查询,但所提供代码执行的是认证凭据清除操作。该操作不查询行情,也不是所声明查询功能的常规支持步骤,属于未声明的配置修改能力。
- Content
Security audit
Security checks for vulnerabilities and agentic risk
ClawScan rates this stock-query skill suspicious because it reports direct execution of unverified remote installers, forced CLI updates, and credential-related actions beyond the stated purpose; some script analysis was partial.
The verdict is suspicious (the Review bucket), not a finding that the author is malicious. Consider avoiding installation unless you can verify the installer and CLI through a trusted source, understand the requested local changes, and are comfortable with the reported update and credential actions; parts of the script analysis were incomplete.
声明用途仅涉及股票行情查询,但所提供代码执行的是认证凭据清除操作。该操作不查询行情,也不是所声明查询功能的常规支持步骤,属于未声明的配置修改能力。
The concern is not merely that updates are absent from the short description: the source mandates a forced executable update for ordinary stock queries. This crosses from data retrieval into software replacement without a necessity check or explicit user approval.
The supplied command performs no visible stock lookup or historical-price retrieval. Although API-key setup could support a stock-query tool, it is the only behavior shown here, so the supplied code does not implement the declared primary purpose. The script implementation is unavailable, so no additional behavior is inferred.
The skill requires a forced CLI update before every financial query, turning a read-oriented request into installation of executable software without separate approval. This unnecessarily expands supply-chain exposure and can replace a working shared dependency; the supplied material does not establish what integrity controls the updater enforces.
Referenced artifact was not completely inspected
sh scripts/run-cli.sh update --force
Referenced artifact was not completely inspected
- 更新后用 `sh scripts/run-cli.sh version` 确认实际版本与 `build_date`。**版本号以实际输出为准**:截至 2026-10-28 核实,test 渠道最新为 `v1.0.18`(`build 2026-10-28T11:33:51`),`v1.0.19` 尚未在该渠道发布
Referenced artifact was not completely inspected
| macOS / Linux | `sh scripts/run-cli.sh <command> [args]` |
Referenced artifact was not completely inspected
sh scripts/run-cli.sh help stock
Referenced artifact was not completely inspected
- 若 `update.needUpdate` 为 `true`,可执行 `sh scripts/run-cli.sh update`;测试环境更新前先核对 `version` 返回的下载来源,仍指向 `/hub/` 时按 [`references/update-guide.md`](references/update
Referenced artifact was not completely inspected
sh scripts/run-cli.sh apikey-set KEY
Referenced artifact was not completely inspected
验证:`sh scripts/run-cli.sh apikey-get`;清除(仅用户明确要求时):`sh scripts/run-cli.sh apikey-clear`。详见 [`references/env-setup-guide.md`](references/env-setup-guide.md)。
Referenced artifact was not completely inspected
macOS / Linux:`sh scripts/run-cli.sh help stock`、`sh scripts/run-cli.sh help stock quote`;Windows 换成 `powershell scripts/run-cli.ps1 ...`。
Referenced artifact was not completely inspected
| Windows | `powershell scripts/<name>.ps1` | `powershell scripts/cli-state.ps1` |
The installation guidance pipes a mutable remote script directly into a shell, with an equivalent PowerShell execution path. HTTPS and a vendor-associated hostname do not independently authenticate an immutable installer, so compromised distribution infrastructure could supply code that accesses local files and credentials.
用户直接提出业务问题时,也必须先检查环境。CLI 或 API Key 未就绪时,当前轮停止业务查询,不得只回复“数据加载失败”、原始错误或泛化的“请检查配置”,必须给出可直接操作的指引:
- **CLI 未安装/不可用**(`cliExists: false`、`cliSource: none`、`cli not found`、`command not found`、`not recognized`):说明本查询依赖腾讯新闻 CLI,当前设备尚未安装或未被识别;按平台提供安装命令:macOS/Linux 使用 `curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh`;Windows PowerShell 使用 `irm https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.ps1 | iex`。提醒安装后重新打开终端并重新提问。
- **CLI 版本不含 `stock`**(`help` 中没有 `stock`,或执行 `stock` 返回 `unknown command`):说明当前版本不支持股票行情,`stock` 自 `v1.0.18` 起提供;引导按 [`references/update-guide.md`](references/update-guide.md) 更新 CLI 后重试。测试环境不要依赖默认的 `update`,需使用对应 test 渠道产物与校验值。
- **API Key 未配置**(`apiKey.status: missing`、`未设置 API Key`、`API Key not set`):说明 CLI 已安装但尚未配置 Key;引导访问 `https://news.qq.com/exchange?scene=appkey%60 获取,然后执行 `tencent-news-cli apikey-set YOUR_KEY`,再执行 `tencent-news-cli apikey-get` 验证。
- **API Key 无效、过期或无权限**(`API Key 无效`、`invalid api key`、`unauthorized`、`401`、`
Both installation alternatives immediately execute code retrieved from a remote URL. No verification of the installer itself is specified before execution, exposing the agent's account to malicious code if the distribution endpoint is compromised.
保持同一运行账号、PATH、HOME、安装目录、shell 和凭证上下文;新建目录、解压或切换源码不代表环境失效。已有本会话的有效状态可复用,发生鉴权错误或环境变化后重新检查。
1. **检查状态**:执行上表对应平台的状态命令。包装脚本缺失、执行失败或 JSON 无法解析时先核实完整包和脚本解释器,不能直接判为 CLI 未安装。
2. **缺少 CLI**:仅状态脚本确认 `cliExists: false` 时安装。`command not found` 可能只是 PATH 未命中;脚本还会检查固定安装目录。macOS / Linux:`curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh`;Windows:`irm https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.ps1 | iex`。安装后在当前对话复查,无需让用户重开终端、重新提问;失败时提供 [安装指南](installation-guide.md),不循环重装。
3. **需要更新**:`update.needUpdate: true`、CLI 明确提示版本过旧或当前帮助不支持所需能力时,按 [更新指南](update-guide.md) 更新并重新读帮助。测试环境先核实 `run-cli version` 的下载渠道;若指向 `/hub/`,不要执行会切回正式构建的更新,使用已核实的测试构建及同渠道校验文件。不能仅凭安装脚本位于 `/test/` 或版本号相同就认定构建正确;来源不明时说明缺口,不猜下载地址。
4. **Key 缺失先核实**:`apiKey.status: missing` 不等于用户从未配置。macOS / Linux 可执行以下命令,只列出配置文件名,不读取或记录 Key 值:
The installation table recommends directly executing a remotely fetched installer. Although this source discusses checksums for CLI binaries, that does not authenticate the installer before it starts executing.
| 平台 | 安装命令 |
| --- | --- |
| macOS / Linux | `curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh \| sh` |
| Windows PowerShell | `irm https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.ps1 \| iex` |
核实版本与能力:
The guide executes a remote installer directly through a shell, and the Windows alternative has the same trust boundary problem. The statement that the script performs verification does not establish verification of the script itself before execution.
打开终端,执行以下命令:
curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh
脚本会自动完成:识别系统和架构 → 下载 CLI → 验证 → 配置环境变量 → 检测 API Key 状态。
The pipe connects network retrieval directly to command execution, eliminating a verification boundary before downloaded code runs. This is the same unsafe installer path identified by SC2, not independent evidence of malicious intent or a separate exploit.
打开终端,执行以下命令:
curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh
脚本会自动完成:识别系统和架构 → 下载 CLI → 验证 → 配置环境变量 → 检测 API Key 状态。
The command fetches a mutable remote script and executes it without checking a signature or independently trusted digest. If the distribution endpoint or publishing pipeline is compromised, the substituted script could access credentials or modify files under the invoking account; HTTPS does not protect against publisher-side compromise.
macOS / Linux:
curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh
Windows:
The pipe sends network-controlled bytes directly into a shell, allowing execution before the complete installer can be inspected or verified. This is the execution mechanism of the external-script finding, not an additional independent exploit, and no malicious publisher intent is established.
macOS / Linux:
curl -fsSL https://mat1.gtimg.com/qqcdn/qqnews/cli/hub/tencent-news/setup.sh | sh
Windows:
Without declared permissions the skill's intent is opaque and cannot be validated.
Recovery guidance treats operating-system and enterprise protection warnings as obstacles to bypass rather than security signals to investigate. If a substituted or malicious CLI triggers those controls, following this guidance could enable execution under the user's account.
The troubleshooting instructions direct users to override Gatekeeper and enterprise security blocks without establishing that the executable is authentic or that an exception is authorized. A connection-refused error is also insufficient evidence that security software should be bypassed.
Once the CLI is missing, the recovery workflow directs the agent to run a remote installer without a separate approval or installer-authentication step. Checking whether installation is necessary does not authorize arbitrary downloaded code or its environment modifications.
The invocation passes the user's natural-language question directly as --query to the CLI, which queries the external Neodata service described earlier. Although the document identifies the data source and warns about API-credit consumption, it does not warn that the question itself is transmitted externally and may include sensitive information.