Back to skill

Security audit

amazon-analysis

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Amazon research skill, but it needs review because its API key handling and bundled workflow documentation are broader than a typical scoped analysis skill.

Review before installing. Use this only if you are comfortable giving it a ZooData API key and spending ZooData credits for Amazon research. Prefer setting ZOODATA_API_KEY only in a controlled environment, do not set ZOODATA_BASE_URL to localhost with a production key, and treat review-derived insights as potentially affected by hostile review text. Pin or verify the installer command before use.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T08 · Insecure Dependencies

Warning
Location
README.md:19
Finding
Unpinned Package Execution During Installation<![CDATA[ ## Vulnerability Details **File Location**: `README.md:19` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add SerendipityOneInc/ZooData-Skills ``` ### Technical Analysis The documented installation procedure invokes `npx` without pinning the `skills` package to a reviewed version or verifying its integrity. Depending on the local npm environment, `npx` can download and execute the currently resolved registry version of that package. Consequently, the code executed during installation is not necessarily the same code that was present when this Skill was audited. A compromised registry account, package takeover, malicious future release, or resolution of an unintended package version could introduce arbitrary installation-time behavior. This is a supply-chain weakness rather than evidence that the currently reviewed package is malicious. ### Attack Path 1. An attacker compromises the npm package resolved as `skills`, its publisher account, or its dependency chain. 2. The attacker publishes a malicious version or modifies a transitive dependency. 3. A user follows the installation command from `README.md`. 4. `npx` resolves and downloads the unpinned package version. 5. The downloaded package or its lifecycle dependencies execute with the permissions of the user running the command. ### Impact Assessment Successful exploitation could result in arbitrary code execution under the installing user's account. The resulting access could include reading user-accessible files and credentials, modifying local configuration, installing persistence, or making network requests. The precise scope depends on the privileges of the user who runs `npx`. The documented command does not itself request administrator privileges. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installer package to a specific reviewed version, for example: ```bash npx --package=skills@PINNED_VERSION skills add SerendipityOneInc/ZooData-Skills ``` 2. Publish and verify package integrity hashes or signed release artifacts. 3. Use a lockfile where the installation workflow permits it. 4. Document the expected package publisher, version, and registry. 5. Review package lifecycle scripts and transitive dependencies before updating the pinned version. 6. Recommend running installation with a non-privileged account and without unnecessary environment secrets. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/zoodata.py:63
Finding
Production API Credential Can Be Transmitted to a Localhost Service<![CDATA[ ## Vulnerability Details **File Location**: `scripts/zoodata.py:63-86` and `scripts/zoodata.py:339-361` **Vulnerability Type**: Excessive trust in configurable credential destination **Risk Level**: Medium ### Vulnerable Code ```python def _is_trusted_host(url): """True only for ZooData hosts and localhost — the sole destinations the API key (Bearer token) may be sent to. Any other host is untrusted and the key is withheld (see api_call), so credentials never reach an arbitrary host.""" host = _host_of(url) return host == "zoodata.ai" or host.endswith(".zoodata.ai") or host in ("localhost", "127.0.0.1") def _resolve_base_url(): """Resolve API base URL, allowing zoodata.ai / localhost hosts via ZOODATA_BASE_URL.""" configured = os.environ.get("ZOODATA_BASE_URL", DEFAULT_BASE_URL).strip().rstrip("/") if configured.rstrip("/") != DEFAULT_BASE_URL.rstrip("/") and not _is_trusted_host(configured): print(f"WARNING: ZOODATA_BASE_URL points at untrusted host '{_host_of(configured)}'. " "Your API key (Bearer token) will NOT be sent there — requests to untrusted " "hosts are refused. Use a zoodata.ai host or localhost.", file=sys.stderr) if configured.endswith(API_BASE_PATH): return configured return f"{configured}{API_BASE_PATH}" BASE_URL = _resolve_base_url() BASE_URL_TRUSTED = _is_trusted_host(BASE_URL) ``` The credential is subsequently attached to requests for any destination classified as trusted: ```python if not BASE_URL_TRUSTED: print(f"ERROR: refusing to send your API key to untrusted host '{_host_of(BASE_URL)}'. " "Set ZOODATA_BASE_URL to a zoodata.ai host or localhost, or unset it.", file=sys.stderr) sys.exit(1) api_key = get_api_key() headers = { "Authorization": f"Bearer {api_key}", "Content-Type": "application/json", "User-Agent": "ZooData-CLI/1.0 (Python)", } ``` ### Technical Analysis The destinat ...[truncated 1721 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict authenticated production requests to the exact expected HTTPS origin, such as `https://api.zoodata.ai`. 2. Do not attach the production Bearer token when the destination is localhost or a loopback address. 3. If local development support is required, require an explicit development-only option and a separate test credential. 4. Reject non-HTTPS production destinations and avoid trusting a host solely by suffix where an exact origin is available. 5. Re-evaluate destination trust immediately before each request rather than relying only on an import-time global value. 6. Add tests confirming that localhost, loopback aliases, malformed URLs, and unrelated domains never receive an `Authorization` header. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
scripts/zoodata.py:910
Finding
Externally Controlled Review Text Is Embedded Directly into an Agent Prompt<![CDATA[ ## Vulnerability Details **File Location**: `scripts/zoodata.py:910-957` **Vulnerability Type**: Indirect prompt injection through external review content **Risk Level**: Medium ### Vulnerable Code ```python def render_review_map_prompt(review: dict, product_title: str = "", product_category: str = "") -> str: title = review.get("title") or "" body = review.get("body") or "" full = f"{title}. {body}" if title else body text = full[:500] rating = review.get("rating") or 3 verified = bool(review.get("verifiedPurchase")) return f"""IMPORTANT: Respond ONLY with a JSON object matching the schema below. Output must be in English — translate non-English text before extracting. You are an expert data extraction specialist analyzing product reviews. Extract only what is EXPLICITLY mentioned — do not infer. JSON schema: {{ "sentiment": "positive" | "neutral" | "negative", "mentioned_scenarios": [string], // max 5 noun phrases 1-3 words (Workouts, Gaming) "mentioned_issues": [string], // max 5 Adjective+Noun for PRODUCT DEFECTS (Poor Sound Quality) "mentioned_positives": [string], // max 5 Adjective+Noun for praised aspects (Comfortable Fit) "mentioned_improvements": [string], // max 3 Verb+Noun explicit suggestions (Extend Battery Life) "mentioned_buying_factors": [string], // max 3 noun phrases for purchase reasons (Price Point) "mentioned_pain_points": [string], // max 3 UX frustrations EXPERIENCED AFTER USE (see rule) "user_profiles": [string], // max 3 identities stated EXPLICITLY (see rule) "mentioned_usage_times": [string], // max 3 time/season phrases (Morning, Winter) "mentioned_usage_locations": [string],// max 3 location phrases (Gym, Home) "mentioned_behaviors": [string], // max 5 Verb+Object (Taking Calls, Running) "keywords": [string] // 3-15 salient words from the review }} Rules: - sentiment: positive (4-5 stars or praise), neutral ...[truncated 2895 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat all review content as untrusted data and place it in a separate data or user-content channel where the model interface supports role separation. 2. Avoid constructing one free-form prompt containing both trusted instructions and untrusted review text. 3. Escape or encode delimiter characters before interpolation. Do not rely on triple quotes as a security boundary. 4. Add an explicit instruction that text inside the review-data field is content to analyze and that any instructions found within it must be ignored. 5. Prefer schema-constrained model output or function calling instead of asking for unrestricted textual JSON. 6. Validate every response against the declared schema, reject unknown fields and trailing text, enforce type and length limits, and retry safely on validation failure. 7. Ensure model-produced fields remain data only and cannot be interpreted as commands, filenames, URLs, or tool instructions later in the workflow. 8. Add adversarial tests containing delimiter closure, “ignore previous instructions,” fake schemas, and tool-use requests. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill description materially understates its behavior: beyond general Amazon analysis, it performs specialized workflows, accesses additional credential locations, and exposes a broader command surface including review export and LLM-assisted processing. This mismatch is dangerous because trust and approval decisions may be made on incomplete information, leading operators to authorize data access, local file reads, or network actions they did not realize the skill could perform.

Ae1

High
Category
analysis-evasion
Content
> **Modes are CLI-local presets, NOT API parameters.** `zoodata.py` expands `--mode` into real filter fields before the call — copy them from `PRODUCT_MODES` in
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill advertises executable behavior involving environment access, file reads, network access, and shell execution, but it does not declare an explicit tool scope such as permissions or allowed-tools. That weakens policy enforcement and reviewability: a host agent may grant broader capabilities than intended, and users or platform operators cannot clearly verify the minimum privileges required.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The guide explicitly instructs the agent to never expose error details to users, which can suppress relevant transparency about failures, degraded results, or inability to validate outputs. In this skill, that matters because the agent is performing multi-step market analysis and may silently substitute estimates or alternate paths, causing users to trust conclusions without knowing important reliability limits.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The trigger list for composite product recommendations is broad and includes generic phrases like 'help me choose' and 'most suitable for me', which can cause the skill to activate for loosely related requests. In an agent environment, this can route users into Amazon-specific workflows unexpectedly, increasing the chance of irrelevant tool use, unnecessary data collection, or confusion about the assistant’s scope.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The seller-origin case study trigger includes a broad activation phrase ('sellers from a specific country') that may match general questions about merchants or nationality outside the intended Amazon competitor-analysis context. Although the section includes good safeguards against inferring origin, unintended invocation could still steer the agent into sensitive nationality-based analysis when the user did not clearly request Amazon-specific market research.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger phrase "what do users want" is overly generic and can match many ordinary requests outside the intended Amazon category-consumer-insights workflow. In an agentic skill-routing context, this can cause accidental activation, leading the system to invoke broad analysis behavior or external data queries when the user did not clearly request this capability.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest describes a general analysis and research engine for broad Amazon exploration, but this file is dedicated to generating and optimizing listing copy, backend search terms, and content rewrites. That is a materially different user-facing function from analysis/reporting and expands the skill into content creation rather than just research.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrase set for competitor listing analysis is broad enough to match ordinary user language without clearly constraining intent or task boundaries. In an agent routing context, this can cause the wrong skill to activate, leading to unintended access to external data tools or execution of workflows the user did not explicitly request.

Vague Triggers

Medium
Confidence
97% confidence
Finding
Phrases like 'write listing' or 'help me write product page' are vague everyday requests that can overlap with many non-Amazon content tasks. In a multi-skill system, ambiguous activation increases the risk of misrouting, causing this skill to inappropriately engage external research steps, consume privileged API access, or generate domain-specific output when another safer skill should handle the request.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The diagnosis triggers use broad language such as 'what's wrong with my listing' and 'improve my listing,' which can capture unrelated requests and route them into a tool-using Amazon workflow. Because this skill interfaces with an external script and API-backed analysis, accidental activation expands the attack surface and may lead to unnecessary data processing or user-confusing actions.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The skill text explicitly says to load for broad market monitoring, competitor tracking, or anomaly detection, which creates an overbroad trigger surface for a powerful analysis skill. In an agentic system, vague activation criteria can cause the skill to be invoked for loosely related requests, increasing the chance of unnecessary external data access, unintended task expansion, or policy-bypassing use in contexts where a more constrained skill should have been selected.

External Transmission

Medium
Category
Data Exfiltration
Content
# ─── Configuration ───────────────────────────────────────────────────────────

DEFAULT_BASE_URL = "https://api.zoodata.ai/openapi/v2"
API_BASE_PATH = "/openapi/v2"
KEYWORD_DATE_RANGE_MAX_DAYS = 93
KEYWORD_TIMELINE_MAX_DAYS = 61
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# ─── Configuration ───────────────────────────────────────────────────────────

DEFAULT_BASE_URL = "https://api.zoodata.ai/openapi/v2"
API_BASE_PATH = "/openapi/v2"
KEYWORD_DATE_RANGE_MAX_DAYS = 93
KEYWORD_TIMELINE_MAX_DAYS = 61
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# ─── Configuration ───────────────────────────────────────────────────────────

DEFAULT_BASE_URL = "https://api.zoodata.ai/openapi/v2"
API_BASE_PATH = "/openapi/v2"
KEYWORD_DATE_RANGE_MAX_DAYS = 93
KEYWORD_TIMELINE_MAX_DAYS = 61
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest describes a broad Amazon research/analysis skill, but this shared script also exposes a distinct prompt-as-data toolkit for raw review extraction, prompt rendering, and local aggregation intended to drive another LLM workflow. Those commands are not merely implementation details of API access; they add a separate review-processing surface that goes beyond the manifest's stated role as a general analysis engine.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This code includes a natural-language instruction that the review-tagging output 'must be in English' and to translate non-English text before extracting. That imposes a specific language policy on all uses of the skill without offering a user choice or documenting a justified locale constraint.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The manifest positions this skill as a general Amazon-domain analysis and multi-endpoint research engine for broad or composite requests, but the script also contains specialized workflows such as market-entry, competitor-analysis, pricing-analysis, daily-radar, listing-audit, opportunity-scan, and review-deepdive. These are narrower expert playbooks with opinionated business logic, not obviously required to satisfy the stated general-purpose overview/research role.

Vague Triggers

Low
Confidence
89% confidence
Finding
The example prompt "Analyze the yoga mat market on Amazon" is a natural-language invocation without any explicit trigger syntax, boundary, or exclusion conditions. In a manifest/README context, this can make activation scope feel broad because similar everyday requests could unintentionally map to the skill.

Vague Triggers

Low
Confidence
89% confidence
Finding
The cross-validation section uses vague trigger phrases such as 'full picture' and 'cross-validate', which are common in many domains and could invoke this Amazon-analysis skill when the user intended a different type of research. The main risk is misrouting and over-broad tool execution across multiple endpoints rather than direct security compromise.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Content
"priceMin", "priceMax", "ratingMin", "ratingMax", "bsrMin", "bsrMax",
                 "salesGrowthRateMin", "salesGrowthRateMax", "sellerCountMin", "sellerCountMax",
                 "variantCountMin", "variantCountMax"):
        val = getattr(args, attr.replace("Min", "_min").replace("Max", "_max")
                      .replace("monthly", "monthly_").replace("review", "review_")
                      .replace("sales", "sales_").replace("Growth", "_growth_")
                      .replace("Rate", "rate_").replace("price", "price_")
Confidence
50% confidence
Finding
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Context-Inappropriate Capability

Low
Confidence
84% confidence
Finding
The `check` command verifies credential configuration and can actively probe multiple API endpoints, including optional paid endpoint tests. That operational diagnostics surface is useful for maintenance, but it is not part of the manifest's described user-facing purpose of Amazon market/product research and analysis.

Static analysis

No suspicious patterns detected.