Back to skill

Security audit

亚马逊新品验证 · 上架前需求测算

Security checks for vulnerabilities and agentic risk

Overview

The skill appears legitimate, but it can spend ARI credits and change monitoring/account state with limited per-operation confirmation.

Review this skill carefully before installing. It is suitable only if you intend to connect an ARI account, allow local API-key storage, and let the agent manage paid review-analysis workflows. Set auto-confirm to always ask if you want explicit approval before every credit-consuming action, and use “只报价,不执行” for pricing-only requests.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
scripts/ari.py:1103
Finding
Server-Controlled Auto-Confirmation Can Trigger Paid Analysis Without Explicit Per-Operation Consent## Vulnerability Details **File Location**: `scripts/ari.py:1103-1112` **Vulnerability Type**: Server-controlled authorization of a paid operation **Risk Level**: Medium **Category**: `other: Unconfirmed paid operation` ### Vulnerable Code ```python q_payload = quote_payload(kind, asin, site, competitor, competitor_site) quote = request_json("POST", "/api/v1/analysis/quote", q_payload) if not ok(quote): return quote q_data = data_of(quote) or {} # First-use confirmation exemption: generate the report immediately when # the server permits automatic confirmation. auto_confirmed = False if not confirm and q_data.get("autoConfirm") and q_data.get("sufficient"): confirm = True auto_confirmed = True if not confirm: return {"success": True, "data": {"confirmationRequired": True, "quote": q_data, "webUrl": q_data.get("webUrl"), "message": "The report will only be generated and credits deducted after the user confirms with --confirm."}, "links": links()} ``` The same trust model is also applied to the combined collection and VOC workflow at `scripts/ari.py:1308-1320`: ```python auto_max = int(analysis_quote.get("autoConfirmMaxCredits") or 0) auto_confirmed = (not args.confirm and bool(analysis_quote.get("autoConfirm")) and sufficient and total_credits <= auto_max) if not args.confirm and not auto_confirmed: combined_quote["autoConfirmRemaining"] = analysis_quote.get("autoConfirmRemaining") emit({"success": True, "data": combined_quote, "links": links()}, args.compact) return if not sufficient: emit(error_obj( "ARI_INSUFFICIENT_CREDITS", 402, "Insufficient credits", "Collection and VOC require %d credits; current balance is %d." % (total_credits, total_balance)), args.compact) return ``` ### Technical Analysis T ...[truncated 3436 chars]
Remediation
## Remediation Suggestions 1. **Require explicit local confirmation by default.** Never change `confirm` from false to true solely because an API response contains `autoConfirm`. ```python if not confirm: return { "success": True, "data": { "confirmationRequired": True, "quote": q_data, }, "links": links(), } ``` 2. **Separate quoting from execution.** Ensure quote commands cannot invoke collection or analysis under any server response. Provide a dedicated preview-only mode whose execution path contains no calls to chargeable endpoints. 3. **Require a prior user-controlled opt-in for automatic spending.** If automatic confirmation is retained, activate it only after the user explicitly configures a maximum credit threshold. Store or retrieve that preference separately from the current quote response and display the active threshold before execution. 4. **Bind authorization to the quoted request.** Use a request identifier, quoted cost, operation type, ASIN, site, and expiration time. Reject execution if any field differs from the operation explicitly approved by the user. 5. **Apply a hard local ceiling.** Enforce a conservative local maximum in addition to the server policy, and require fresh confirmation whenever the price changes or a collection step is added. 6. **Add audit logging.** Record whether authorization came from an explicit `--confirm` option or a previously configured user threshold, together with the request ID and charged amount. Do not log the API key. 7. **Add regression tests.** Verify that `autoConfirm: true` cannot trigger a paid request when no explicit confirmation or preconfigured user spending authorization exists.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (46)

Tainted flow: 'req' from os.environ.get (line 1459, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
headers = {"Authorization": "Bearer " + require_key(), "User-Agent": user_agent()}
    try:
        req = urllib.request.Request(url, headers=headers, method="GET")
        with urllib.request.urlopen(req, timeout=TIMEOUT_SEC) as resp:
            note_release(resp.headers)
            ctype = resp.headers.get("Content-Type", "")
            body = resp.read()
Confidence
88% confidence
Finding
The export/download path sends the bearer API key to whatever base_url() returns, and custom-host use is permitted when ARI_ALLOW_CUSTOM_BASE=1 is set. In the skill context, environment variables are a realistic control plane for wrappers/agents, so a misconfigured or manipulated runtime can redirect authenticated requests and exfiltrate the user's API key and exported data to an attacker-controlled host.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill invokes shell commands, uses network access, reads environment variables, and writes local files, but it does not declare those capabilities up front. That creates a transparency and consent problem: a user or hosting agent may believe this is a simple research skill, while it can persist credentials locally and perform external actions. In this context, the hidden capability surface increases risk because the skill also manages API authorization and paid operations.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The declared purpose is narrow product validation, but the actual behavior covers billing-sensitive actions, recurring schedules, watch management, exports, operational workflows, and local credential handling. This mismatch can cause over-broad invocation and user consent bypass, where a user asks for lightweight research but the skill can trigger account-affecting or paid actions beyond the expected scope. Because the skill includes autonomous paid/report-generation pathways, the mismatch materially increases danger.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill manifest presents a narrow pre-launch product-validation purpose, but this code exposes broad product-operations workflows with quoting, execution, state tracking, and capability discovery. That scope mismatch is dangerous because an agent or user may invoke high-impact operational actions not expected from the advertised skill, reducing informed consent and increasing the chance of unintended paid or business-affecting actions.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The code includes persistent monitoring, watch creation, watch pause/resume/delete, competitor management, scheduling, and radar functionality that goes beyond one-time new-product validation. In a skill advertised for pre-launch research, hidden lifecycle-management features can lead to ongoing account changes and surveillance behaviors that the user did not knowingly authorize.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
Review-workbench status mutation and AI remediation advice are seller-operations features, not new-product validation features. This broadens the agent's effective authority to alter workflow state and trigger paid advice generation in a context where users would reasonably expect read-only market research behavior.

Description-Behavior Mismatch

Low
Confidence
86% confidence
Finding
The export functionality writes reports or review CSVs to arbitrary local paths supplied by the caller, yet local file output is not disclosed in the skill description. In agent settings, undocumented file writes can surprise users, overwrite files, or create unintended local persistence of potentially sensitive business data.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
Arbitrary product-operations workflow execution is not justified by a pre-launch validation skill and can run server-side business processes beyond passive research. Because the code can quote and execute these workflows with request IDs and SSE status handling, it materially expands the action surface and could incur charges or operational side effects under misleading skill scope.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
Updating review-workbench statuses is an account-state mutation unrelated to pre-launch validation. In this context it is especially risky because a research-oriented skill should not silently gain authority to alter seller workflow records, which may affect team processes and auditability.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill metadata presents this as a pre-launch new-product validation tool, but the documentation includes broader operational capabilities like alerts, exports, and continuous monitoring. This scope mismatch can mislead users and host agents into invoking side-effecting or paid workflows they did not intend, weakening least-privilege and informed-consent expectations.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
This section documents product operations and watch-management features that are unrelated to the declared pre-launch research purpose. In an agent setting, hidden capability expansion increases the chance of unauthorized monitoring, recurring charges, or unintended manipulation of account state under the guise of harmless validation research.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The documentation further exposes alert triage, review workbench actions, benchmarking, leaderboard queries, competitor binding, and export/report management beyond the advertised purpose. These workflows can change ongoing monitoring relationships, produce billable actions, or access broader account data, making the mismatch materially risky in an autonomous or semi-autonomous client.

Intent-Code Divergence

Low
Confidence
81% confidence
Finding
The guide initially tells users they only need to provide product identifiers and questions, but later reveals many additional command families and side-effecting workflows. This can create a deceptive safety impression that discourages scrutiny before the agent triggers paid, persistent, or state-changing operations.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The trigger phrases are broad enough to match many ordinary product-planning conversations, which raises the chance this skill will activate in contexts where the user did not intend review scraping, account checks, or paid analysis. Given the skill's access to external services and billing-related operations, over-triggering is not just UX noise; it can expose users to unexpected data access or charges.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
1. 运行 `check`,确认账户、邮箱验证状态和可用积点。
2. 用户要 VOC / 评论分析报告时,默认运行 `voc <ASIN> --site <站点>`。
   **返回里有 `autoConfirmed: true` 就说明已经直接生成了**(1.4.5 起:服务端对前几次小额
   付费操作免确认,用户先拿到结果再谈钱),此时把报告讲给用户,并转述 `autoConfirmNote`
   (本次扣了多少、还剩几次免确认、之后会先问)。**不要在拿到结果后再补问「要不要生成」。**
3. 返回 `confirmationRequired: true` 才需要用户确认:报出 `totalCredits` 与余额,
Confidence
95% confidence
Finding
The workflow directs the agent to run a paid VOC action by default and accept service-side auto-confirmation as sufficient without obtaining a fresh, explicit user confirmation in-session. Even if the backend permits small automatic charges, the skill is instructing the agent to proceed from a natural-language request into a potentially billable action, which undermines informed consent and can lead to unwanted charges.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
1. 运行 `check`,确认账户、邮箱验证状态和可用积点。
2. 用户要 VOC / 评论分析报告时,默认运行 `voc <ASIN> --site <站点>`。
   **返回里有 `autoConfirmed: true` 就说明已经直接生成了**(1.4.5 起:服务端对前几次小额
   付费操作免确认,用户先拿到结果再谈钱),此时把报告讲给用户,并转述 `autoConfirmNote`
   (本次扣了多少、还剩几次免确认、之后会先问)。**不要在拿到结果后再补问「要不要生成」。**
3. 返回 `confirmationRequired: true` 才需要用户确认:报出 `totalCredits` 与余额,
   用户同意后运行 `voc <ASIN> --site <站点> --confirm`。该命令会自动补齐采集、等待任务完成、
Confidence
95% confidence
Finding
This step authorizes a confirmed paid run after presenting only cost and balance, with the broader workflow designed to auto-complete collection, polling, report generation, and archival. The danger is not the existence of confirmation itself, but that the skill normalizes a highly stateful, billable workflow from minimal prompts and encourages the agent to make execution decisions on the user's behalf.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
用户只说自然语言。网页是补充视图(图表、分享链接、海报),不是把人送走的地方。

**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
Confidence
97% confidence
Finding
The instruction to generate immediately when `autoConfirm: true` explicitly tells the agent not to ask the user again before a billable operation. That is a classic autonomous decision-making issue in a billing context: service-side convenience is being treated as equivalent to user intent, which can produce unauthorized or surprising charges.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
- 报价需要确认时,只说两个数:这次多少积点、余额多少,然后等用户一个「好」。采集是**固定单价**:直接说「15 积点/页 × 3 页 = 45 积点」,不要说成「预计 / 最多」——价格不会浮动;商品评论不够这么多页时只收实际采到的页数,差额自动退回(`pricingNote` 已写好这句)。不要罗列参数。
Confidence
91% confidence
Finding
The same `autoconfirm` instruction also minimizes the information presented at quote time to just two numbers, which reduces user understanding of what is being authorized. In a paid workflow with collection and analysis side effects, under-informing the user raises the chance of uninformed consent.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
- 报价需要确认时,只说两个数:这次多少积点、余额多少,然后等用户一个「好」。采集是**固定单价**:直接说「15 积点/页 × 3 页 = 45 积点」,不要说成「预计 / 最多」——价格不会浮动;商品评论不够这么多页时只收实际采到的页数,差额自动退回(`pricingNote` 已写好这句)。不要罗列参数。
Confidence
91% confidence
Finding
The same `autoconfirm` instruction also minimizes the information presented at quote time to just two numbers, which reduces user understanding of what is being authorized. In a paid workflow with collection and analysis side effects, under-informing the user raises the chance of uninformed consent.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
- 报价需要确认时,只说两个数:这次多少积点、余额多少,然后等用户一个「好」。采集是**固定单价**:直接说「15 积点/页 × 3 页 = 45 积点」,不要说成「预计 / 最多」——价格不会浮动;商品评论不够这么多页时只收实际采到的页数,差额自动退回(`pricingNote` 已写好这句)。不要罗列参数。

**新手(`check` 返回 `autoConfirm.mode` 为 `first_runs` / `free_small`,或问"然后呢")**
Confidence
88% confidence
Finding
The onboarding guidance optimizes for minimal friction and a single 'OK' approval, which is convenient but increases the risk that inexperienced users authorize charges without understanding the workflow. In context, this is more dangerous because the target audience is explicitly non-technical and may rely heavily on the agent's framing.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
voc B0... --site amz_us 是完整 VOC 的入口:先取得报价,已有足够评论时使用当前分析价格;
数据不足时合并采集与分析费用。符合服务端免确认规则且总额不超过上限时可能直接生成,
返回 autoConfirmed。否则返回 confirmationRequired,取得用户同意后追加 --confirm,
自动完成必要采集、等待、分析和归档。只读询价应使用 quote / collect 报价入口。

`collect --asin B0... --site amz_us --pages 3` 只返回报价;确认后追加
Confidence
83% confidence
Finding
This section states that `voc` may directly generate paid analysis when server-side auto-confirm rules match, combining collection, waiting, analysis, and archiving without an interactive confirmation step. In an agent context, that creates a real risk of autonomous spending or unintended external actions if the agent treats quote-like flows as safe and does not independently obtain user approval.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
先调用 `quote --type ...`。报价字段:
`type, basePrice, price, sampledReviews, totalReviews, balance, sufficient`,
另有(1.4.5):`autoConfirm`(true = 服务端首次体验策略允许免确认直接生成)、
`autoConfirmMaxCredits`(免确认单次上限,采集 + 报告合计)、`autoConfirmRemaining`(还剩几次)、
`autoConfirmNote`、`webUrl`(该产品的网页报告页)。`sampleCap` / `degraded` 表示 Free 样本封顶与轻量模型。
`voc` / `analyze` 在 autoConfirm 命中时会直接生成,返回 `autoConfirmed: true` 与 `autoConfirmNote`,
Confidence
86% confidence
Finding
The quote schema explicitly exposes `autoConfirm` and related fields indicating that a paid action may proceed immediately under a server-side policy. In an agent skill, this increases the chance that the agent interprets the presence of `autoConfirm=true` as authorization to act, enabling spending and data processing without fresh user consent.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
先调用 `quote --type ...`。报价字段:
`type, basePrice, price, sampledReviews, totalReviews, balance, sufficient`,
另有(1.4.5):`autoConfirm`(true = 服务端首次体验策略允许免确认直接生成)、
`autoConfirmMaxCredits`(免确认单次上限,采集 + 报告合计)、`autoConfirmRemaining`(还剩几次)、
`autoConfirmNote`、`webUrl`(该产品的网页报告页)。`sampleCap` / `degraded` 表示 Free 样本封顶与轻量模型。
`voc` / `analyze` 在 autoConfirm 命中时会直接生成,返回 `autoConfirmed: true` 与 `autoConfirmNote`,
并附 `web.report` / `web.product` 网页链接。
Confidence
86% confidence
Finding
This duplicate finding refers to the same auto-confirm metadata and the same risk: a backend policy could be mistaken for permission for the agent to act. The danger is contextual because the skill has paid operations and report generation, so silent execution has financial and operational consequences.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
先调用 `quote --type ...`。报价字段:
`type, basePrice, price, sampledReviews, totalReviews, balance, sufficient`,
另有(1.4.5):`autoConfirm`(true = 服务端首次体验策略允许免确认直接生成)、
`autoConfirmMaxCredits`(免确认单次上限,采集 + 报告合计)、`autoConfirmRemaining`(还剩几次)、
`autoConfirmNote`、`webUrl`(该产品的网页报告页)。`sampleCap` / `degraded` 表示 Free 样本封顶与轻量模型。
`voc` / `analyze` 在 autoConfirm 命中时会直接生成,返回 `autoConfirmed: true` 与 `autoConfirmNote`,
并附 `web.report` / `web.product` 网页链接。
Confidence
86% confidence
Finding
This duplicate finding refers to the same auto-confirm metadata and the same risk: a backend policy could be mistaken for permission for the agent to act. The danger is contextual because the skill has paid operations and report generation, so silent execution has financial and operational consequences.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
`type, basePrice, price, sampledReviews, totalReviews, balance, sufficient`,
另有(1.4.5):`autoConfirm`(true = 服务端首次体验策略允许免确认直接生成)、
`autoConfirmMaxCredits`(免确认单次上限,采集 + 报告合计)、`autoConfirmRemaining`(还剩几次)、
`autoConfirmNote`、`webUrl`(该产品的网页报告页)。`sampleCap` / `degraded` 表示 Free 样本封顶与轻量模型。
`voc` / `analyze` 在 autoConfirm 命中时会直接生成,返回 `autoConfirmed: true` 与 `autoConfirmNote`,
并附 `web.report` / `web.product` 网页链接。
Confidence
88% confidence
Finding
This line says `voc` / `analyze` will directly generate when `autoConfirm` is hit, returning `autoConfirmed: true`. In a security review of an agent skill, that is a true issue because it explicitly permits autonomous execution of potentially billable remote actions, which is unsafe unless the agent adds its own consent gate.

Static analysis

No suspicious patterns detected.