Back to skill

Security audit

Amazon Listing Judge

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Amazon listing-grader purpose, but it sends a long-lived service key to a user-configured external API endpoint without validating that destination.

Review before installing. Only use a CLAW_API_BASE value from a trusted provider, prefer HTTPS, protect and rotate the CLAW_KEY, and expect each run to send the key and requested ASIN URL to that external scraping service. Pin dependencies before production use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
scripts/grade.py:2
Finding

Unpinned Runtime Dependency Creates a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
"] # /// ``` The selected version should also be represented in a hash-verified lockfile. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/grade.py:28
Finding

Unvalidated API Base Can Redirect Credentials to an Arbitrary Endpoint

Content
View full analysis
dict: url = f"https://www.amazon.com/dp/{asin}" print(f"Fetching {url} ...", file=sys.stderr) resp = httpx.post( f"{CLAW_API_BASE}/api/scrape", json={"claw_key": CLAW_KEY, "url": url, "mode": "scraper"}, timeout=90, ) ``` ### Technical Analysis `CLAW_API_BASE` is taken directly from the environment or the Skill’s `.env` file and used as the destination of an HTTP request. The code does not validate the URL scheme, hostname, port, or final origin before transmitting `CLAW_KEY` in the request body. If configuration can be influenced, the API request can therefore be redirected to an attacker-controlled server. A plaintext `http://` value would also allow the key to traverse the network without transport encryption. Because the credential is placed in the JSON body, any selected endpoint receives it directly. The prerequisite is control over the process environment or `.env` configuration. The issue does not, by itself, permit an unauthenticated remote attacker to alter that configuration. ### Attack Path 1. An attacker or compromised deployment mechanism changes `CLAW_API_BASE` in the process environment or Skill `.env` file. 2. The value is set to an attacker-controlled endpoint, such as `https://attacker.example`, or to an unencrypted HTTP endpoint. 3. A user invokes the listing grader with a valid `CLAW_KEY`. 4. `fetch_pdp()` sends a POST request to the substituted endpoint’s `/api/scrape` path. 5. The endpoint receives the `CLAW_KEY`, requested Amazon URL, and mode. 6. The attacker may reuse the exposed key subject to the permissions and controls enforced by the external service. ### Impact Ass ...[truncated 532 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (10)

Tainted flow: 'CLAW_API_BASE' from os.environ.get (line 32, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The script reads CLAW_API_BASE from a local .env/environment and uses it directly as the destination for an authenticated HTTP request containing the CLAW_KEY and target URL. If that variable is modified, the skill will send secrets and user-request metadata to an attacker-controlled endpoint, creating an SSRF/exfiltration path. The skill context makes this more dangerous because users expect a simple ASIN grader, not hidden trust in an arbitrary third-party API base.

Content

Scanner excerpt · scripts/grade.py (reported line 38)May include surrounding context.

python
def fetch_pdp(asin: str) -> dict:
    url = f"https://www.amazon.com/dp/{asin}"
    print(f"Fetching {url} ...", file=sys.stderr)
    resp = httpx.post(
        f"{CLAW_API_BASE}/api/scrape",
        json={"claw_key": CLAW_KEY, "url": url, "mode": "scraper"},
        timeout=90,

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/grade.py (reported line 8)May include surrounding context.

python
"""
Grade an Amazon product listing on a 0-100 scale.
Usage: grade.py <ASIN>
Requires env vars: CLAW_KEY, CLAW_API_BASE  (set in the skill's .env file)
"""
import os
import sys

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/grade.py (reported line 209)May include surrounding context.

python
"""
Grade an Amazon product listing on a 0-100 scale.
Usage: grade.py <ASIN>
Requires env vars: CLAW_KEY, CLAW_API_BASE  (set in the skill's .env file)
"""
import os
import sys

Credential Access

High
Category
Privilege Escalation
Confidence
79% confidence
Finding

At this line the script locates a local .env file and proceeds to load entries into process environment, giving the skill access to secrets stored beside the project. In isolation this is a common pattern, but in a skill that also performs outbound requests it creates a credential-access capability that may exceed user expectations and can facilitate secret misuse if the skill or environment is tampered with.

Content

Scanner excerpt · scripts/grade.py (reported line 17)May include surrounding context.

python
from pathlib import Path
import httpx

# Load skill .env (next to this script's parent directory)
_env_path = Path(__file__).parent.parent / '.env'
if _env_path.exists():
    with open(_env_path) as _f:

Credential Access

High
Category
Privilege Escalation
Confidence
79% confidence
Finding

Opening and reading the local .env file is part of the skill's credential-access behavior. Combined with later use of those values in network requests, this means the skill can ingest local secrets and potentially disclose them externally. The skill context makes this more suspicious because credential access is not inherent to merely calculating a listing quality score.

Content

Scanner excerpt · scripts/grade.py (reported line 18)May include surrounding context.

python
import httpx

# Load skill .env (next to this script's parent directory)
_env_path = Path(__file__).parent.parent / '.env'
if _env_path.exists():
    with open(_env_path) as _f:
        for _line in _f:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill explicitly requires a secret key in a local .env file and references an external API base, which indicates network access and use of environment-provided secrets, yet it declares no tool scope or permission boundaries. This creates an unnecessary trust gap: an agent or reviewer cannot tell from the manifest that the skill may access secrets and make outbound requests, increasing the risk of unintended data exposure or unreviewed external communication.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger list contains broad natural-language phrases such as 'listing analysis', 'listing score', and generic multilingual scoring terms that could match ordinary user conversation and invoke the skill unexpectedly. In a skill that uses an external key and likely performs network requests, overbroad triggering raises the chance of unintended activation, unnecessary secret-backed API calls, or confusing behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill loads local credentials from .env and depends on a paid third-party scraping service even though its advertised function is just to score an Amazon listing from an ASIN. This expands the trust boundary unnecessarily and can expose secrets and user activity to an external provider without clear justification or transparency. In this skill context, the mismatch between stated purpose and actual capability increases risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script automatically reads secrets from a local .env file without any explicit user-facing warning or consent flow. While reading configuration is common, in an agent skill this can surprise operators by expanding access to local sensitive data and combining it with outbound network behavior. The context makes it somewhat more dangerous because the skill is marketed as a simple listing grader, not as something that accesses local credentials.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest presents the skill as a direct ASIN-to-score grader, but the actual implementation delegates data retrieval to a separate remote scraping service via HTTP POST. Network retrieval is expected for this use case, but the reliance on an external scraper is still a meaningful behavior not reflected in the description.

Content

No source excerpt is available for this finding.