Back to skill

Security audit

Amazon 竞品商品页审查

Security checks for vulnerabilities and agentic risk

Overview

The skill is labeled as a narrow Amazon page-audit tool, but its artifacts expose broader billable analysis, monitoring, account-setting changes, and export capabilities that deserve manual review before installation.

Install only if you intend to give this ARI skill broad access to your ARI account, saved API key, review/report data, credit-consuming analyses, exports, and monitoring settings. For a strict competitor page audit, prefer a narrower package or require manual confirmation for every paid or persistent action, especially auto-confirm thresholds, schedules, watches, competitor binding, workbench updates, and exports.

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)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:34
Finding
Mandatory Unrelated Service Calls and Promotional Output Alter Agent Behavior<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:34`, `SKILL.md:102-103`, `SKILL.md:114-115`, and `SKILL.md:230-231` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:34`: ```markdown - API reference: read `references/reference.md` when fields, commands, or error codes are needed. CLI: `scripts/ari.py` under this Skill directory. Run it from the Skill root, for example `python scripts/ari.py check`; run `check` once at the beginning of every session. ``` `SKILL.md:102-103`: ```markdown 8. After running `check` at the beginning of a session, also run `alerts` once. If there are unread negative-review alerts, proactively tell the user, and propose using `workbench` to locate the negative reviews and `advise --review-id <ID>` to generate reply suggestions. ``` `SKILL.md:114-115`: ```markdown The report directly provides core search terms, long-tail/scenario terms, negative-keyword candidates, competitor brand terms, and a Search Terms string. After a VOC report is produced, proactively mention that buyers' wording in reviews is an effective keyword source. ``` `SKILL.md:230-231`: ```markdown At the end, briefly list the ASIN/site, sample size, statistical window, `reportId`, `creditsUsed`, and current balance. When the output contains `reportUrl`, it must be appended at the end using fixed wording: “View the complete chart-based report online / export: <reportUrl>” (login to the owning account is required). ``` The snippets above are faithful English renderings of the corresponding source instructions. ### Technical Analysis The Skill instructions impose recurring behavior that is not necessarily required by the user's current request: - An authenticated account check is required at the beginning of every session. - An additional alerts request is required even when the user did not ask about alerts. - The agent is instructed to promote a paid analysis fea ...[truncated 2983 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the requirement to run `check` at the beginning of every session. Invoke it only when account state, authorization, balance, or payment eligibility is necessary for the requested operation. 2. Do not run `alerts` automatically. Require an explicit alert-related request or ask the user before performing the additional authenticated query. 3. Remove mandatory promotion of keyword analysis, monitoring, billing, or other paid features. Present such options only when directly relevant to the user's stated goal. 4. Replace fixed report-link wording with optional, context-sensitive guidance. Respect requests for concise output or requests not to include external links. 5. Document each automatic network call and the categories of account metadata it returns. 6. Apply a purpose-limitation rule: every authenticated request should be necessary to fulfill the current user request. 7. Keep account mutations, recurring monitoring, and paid operations behind explicit user intent and confirmation, regardless of promotional workflow guidance. 8. Add tests verifying that read-only page-audit requests do not trigger unrelated `check`, `alerts`, monitoring, or paid-feature calls. ]]>
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 (23)

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
93% confidence
Finding
The export path writes authenticated responses to an arbitrary local destination supplied by --out. In an agent context, an untrusted prompt or wrapper could steer exports into sensitive filesystem locations, causing overwrite of user files or placing report data in unsafe paths. The skill description is audit-oriented, so local arbitrary file writes are broader than necessary and increase risk.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill instructs the agent to use shell, network, environment-variable, and local file-write capabilities to run `scripts/ari.py`, retrieve/store API keys, and call remote services, but it does not declare these permissions up front. That creates a transparency and consent gap: users and hosting systems may believe the skill is low-risk page-audit logic while it can execute commands, access secrets, and persist credentials locally.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The metadata says this skill is only for competitor page audits, but the body defines a much broader agent that can collect reviews, run multiple AI analyses, manage subscriptions/schedules/watchers, export data, configure credentials, and trigger paid operations. This mismatch is dangerous because users may grant trust and invoke the skill for a narrow review task while the agent is authorized to perform materially broader actions, including billable and state-changing operations.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill manifest describes a page-audit tool, but the code exposes broad capabilities including monitoring, operations workflows, workbench actions, alerts, leaderboard queries, exports, and account-linked watch management. This scope expansion violates least privilege: an agent granted this skill could perform materially different actions than a user would expect from a read-focused audit tool.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The code can modify persistent remote state unrelated to a read-only audit workflow, including autoconfirm settings, schedules, competitors, watches, workbench statuses, and operations runs. In an agent setting this enables unwanted account changes and potentially paid or ongoing workflows beyond the expected audit scope.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill can write exported review/report data to arbitrary local files, which exceeds the expected behavior of producing audit output in-band. In an agent environment, this can create unintended data persistence, overwrite files, or place sensitive business data into shared or synced locations.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The usage guide advertises a broad ARI review-analysis, monitoring, export, and operations suite that materially exceeds the manifest’s declared purpose of competitor page auditing only. This creates a scope-mismatch vulnerability: an agent or user may invoke capabilities involving review collection, monitoring, reporting, or operational workflows that were not expected, approved, or risk-assessed for this skill.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The opening description frames the skill as an Amazon review intelligence assistant and explicitly instructs users to analyze reviews, low-star feedback, VOC-style outputs, and monitoring behaviors, directly contradicting the metadata that says the skill is only for page audits and not for broader analytics. In an agent environment, this kind of instruction drift is dangerous because the model may prioritize the richer embedded instructions and perform actions outside approved business and data-use boundaries.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The document includes monitoring, alerting, operational reports, watch workflows, workbench actions, benchmarking, exports, and historical reporting that are unjustified for a narrow page-audit skill. Even if individually legitimate elsewhere, bundling them here expands the effective authority of the skill and increases the chance of unauthorized automation, unexpected charges, and access to data/functions beyond user intent.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The natural-language trigger is broad enough to match ordinary review-analysis requests and then steer them into this skill's larger workflow surface. In context, that increases the chance of unintended invocation of a skill that can execute commands, call external APIs, and potentially incur charges or mutate account state.

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
This section explicitly allows the agent to proceed with paid report generation when the backend marks the request `autoConfirmed: true`, without obtaining fresh per-action user approval in the conversation. Because the same skill can trigger billable operations, this creates a real risk of unintended charges and action execution based on broad natural-language requests.

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
93% confidence
Finding
The workflow defaults to running `voc <ASIN>` for user requests about analysis, and the surrounding text states this may directly generate a paid report. Default execution of a potentially billable operation from a general request materially increases the chance of unauthorized or surprising actions.

Autonomous Decision Making

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

**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
Confidence
95% confidence
Finding
Reinforcing that `autoConfirm: true` should bypass an interactive approval step normalizes autonomous execution of chargeable actions. In a skill with broad triggers and wide operational scope, that reduces meaningful user consent and increases financial and operational risk.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
- 报价需要确认时,只说两个数:这次多少积点、余额多少,然后等用户一个「好」。采集是**固定单价**:直接说「15 积点/页 × 3 页 = 45 积点」,不要说成「预计 / 最多」——价格不会浮动;商品评论不够这么多页时只收实际采到的页数,差额自动退回(`pricingNote` 已写好这句)。不要罗列参数。
Confidence
90% confidence
Finding
The same `autoconfirm` instruction also encourages threshold-based future autonomous spending, e.g. '50 credits or less directly do it'. This increases blast radius because a single conversational preference can silently authorize later billable operations across broader workflows than the user may anticipate.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**确认与扣点**
- 报价返回 `autoConfirm: true` 时直接生成,不要再问「要不要」。生成后一句话交代:本次扣了多少、
  还剩几次免确认(或「免费版小额不问」)。策略由服务端决定:免费版小额不问;付费版前几次不问,之后先问。
- 用户说「以后别问了 / 50 以内直接做」→ 运行 `autoconfirm 50`;说「以后每次先问我」→ `autoconfirm off`;
  说「恢复默认」→ `autoconfirm default`。这是唯一需要你代用户设置的东西,设完复述一句当前规则。
- 报价需要确认时,只说两个数:这次多少积点、余额多少,然后等用户一个「好」。采集是**固定单价**:直接说「15 积点/页 × 3 页 = 45 积点」,不要说成「预计 / 最多」——价格不会浮动;商品评论不够这么多页时只收实际采到的页数,差额自动退回(`pricingNote` 已写好这句)。不要罗列参数。
Confidence
90% confidence
Finding
The same `autoconfirm` instruction also encourages threshold-based future autonomous spending, e.g. '50 credits or less directly do it'. This increases blast radius because a single conversational preference can silently authorize later billable operations across broader workflows than the user may anticipate.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `watch digest` | product-operations/watch-digest(GET) | 否;确定性摘要,`creditsUsed: 0` |
| `watch events` | product-operations/events(GET) | 否;读取确定性变化事件 |
| `analyze` | analysis/voc·keywords·insight·trend·variant·compare | 是;`--confirm` 或服务端 autoConfirm 命中 |
| `autoconfirm [N\|off\|default]` | user/autoconfirm(GET/PUT) | 否;设置免确认阈值(1.4.5) |
| `deepdive` | products + charts + reviews + reports + VOC quote/analysis | 默认否;`--confirm` 才分析 |
| `reports` / `report` | reports | 否 |
| `alerts` | alerts(`--mark-read` 时 alerts/read) | 否 |
Confidence
79% confidence
Finding
Allowing an agent-accessible path to modify auto-confirm settings can persistently lower safeguards for future credit-consuming actions. That creates a real risk of unauthorized or unexpected paid analysis runs beyond the current task, especially because the setting is account-level and long-lived.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
| `watch digest` | product-operations/watch-digest(GET) | 否;确定性摘要,`creditsUsed: 0` |
| `watch events` | product-operations/events(GET) | 否;读取确定性变化事件 |
| `analyze` | analysis/voc·keywords·insight·trend·variant·compare | 是;`--confirm` 或服务端 autoConfirm 命中 |
| `autoconfirm [N\|off\|default]` | user/autoconfirm(GET/PUT) | 否;设置免确认阈值(1.4.5) |
| `deepdive` | products + charts + reviews + reports + VOC quote/analysis | 默认否;`--confirm` 才分析 |
| `reports` / `report` | reports | 否 |
| `alerts` | alerts(`--mark-read` 时 alerts/read) | 否 |
Confidence
79% confidence
Finding
Allowing an agent-accessible path to modify auto-confirm settings can persistently lower safeguards for future credit-consuming actions. That creates a real risk of unauthorized or unexpected paid analysis runs beyond the current task, especially because the setting is account-level and long-lived.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
}


def cmd_autoconfirm(args):
    """免确认阈值:不带参数=查看;`autoconfirm 50`=50 积点以内不问;`autoconfirm off`=每次都问;`autoconfirm default`=恢复默认。"""
    value = (args.value or "").strip().lower()
    if value:
Confidence
96% confidence
Finding
This command modifies the account's autoconfirm threshold, allowing future paid operations to proceed without per-action confirmation. In an agent context, changing this setting materially weakens a billing safety control and can enable unintended spending after a single remote state change.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
limit = int(value)
            except ValueError:
                emit(error_obj("ARI_BAD_ARGUMENT", 0, "参数不对",
                               "用法:autoconfirm 50(50 积点以内不问)/ autoconfirm off(每次都问)/ autoconfirm default(恢复默认)"),
                     args.compact)
                return
        out = request_json("PUT", "/api/v1/user/autoconfirm", {"limit": limit})
Confidence
97% confidence
Finding
This PUT request persists a new autoconfirm limit on the user's account, which can authorize future paid actions to happen without explicit confirmation. In a skill advertised for page audit, mutating billing-safety settings is out of scope and increases the risk of unintended charges driven by agent behavior.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
limit = int(value)
            except ValueError:
                emit(error_obj("ARI_BAD_ARGUMENT", 0, "参数不对",
                               "用法:autoconfirm 50(50 积点以内不问)/ autoconfirm off(每次都问)/ autoconfirm default(恢复默认)"),
                     args.compact)
                return
        out = request_json("PUT", "/api/v1/user/autoconfirm", {"limit": limit})
Confidence
97% confidence
Finding
This PUT request persists a new autoconfirm limit on the user's account, which can authorize future paid actions to happen without explicit confirmation. In a skill advertised for page audit, mutating billing-safety settings is out of scope and increases the risk of unintended charges driven by agent behavior.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
limit = int(value)
            except ValueError:
                emit(error_obj("ARI_BAD_ARGUMENT", 0, "参数不对",
                               "用法:autoconfirm 50(50 积点以内不问)/ autoconfirm off(每次都问)/ autoconfirm default(恢复默认)"),
                     args.compact)
                return
        out = request_json("PUT", "/api/v1/user/autoconfirm", {"limit": limit})
Confidence
97% confidence
Finding
This PUT request persists a new autoconfirm limit on the user's account, which can authorize future paid actions to happen without explicit confirmation. In a skill advertised for page audit, mutating billing-safety settings is out of scope and increases the risk of unintended charges driven by agent behavior.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
if not ok(quote):
        return quote
    q_data = data_of(quote) or {}
    # 首次体验免确认(服务端策略 skill.autoConfirm):前几次小额直接生成,不再多问一轮。
    auto_confirmed = False
    if not confirm and q_data.get("autoConfirm") and q_data.get("sufficient"):
        confirm = True
Confidence
98% confidence
Finding
This logic explicitly converts a non-confirmed paid analysis request into a confirmed one when the server returns autoConfirm and sufficient balance. That means the skill can trigger chargeable analysis without an explicit per-request user confirmation, which is especially risky in an agent-mediated context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
if plan is not None and plan["balance"]["note"]:
        combined_quote["siteNote"] = plan["balance"]["note"]
    combined_quote["webUrl"] = analysis_quote.get("webUrl")
    # 首次体验免确认:服务端 autoConfirm=true 且「采集 + 报告」合计不超过单次上限时,直接跑完。
    # 在聊天里多问一句「确认吗」,很多用户就不回了——先让他拿到结果。
    auto_max = int(analysis_quote.get("autoConfirmMaxCredits") or 0)
    auto_confirmed = (not args.confirm and bool(analysis_quote.get("autoConfirm"))
Confidence
98% confidence
Finding
This VOC flow calculates whether it should automatically proceed with both collection and analysis when the server indicates autoConfirm and a credit ceiling is met. Because collection and VOC generation are chargeable operations, this can cause spending and remote actions without explicit per-run user approval.

Static analysis

No suspicious patterns detected.