Back to skill

Security audit

Costco Inventory Monitor

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent as an inventory monitor, but it needs review because it runs recurring proxy-based web checks, can expose proxy credentials in output, and does not restrict product URLs to Costco.

Review before installing. Use this only for authorized monitoring, keep polling frequency modest, avoid printing or logging credential-bearing proxy URLs, restrict product URLs to approved Costco hosts, and disable the OpenClaw cron job when monitoring is no longer needed.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build_monitor_config.py:175
Finding

Proxy Credentials Exposed in Generated Configuration Output

Content
View full analysis
dict: if args.network_path == "direct": return { "enabled": False, "mode": "direct", "reason": "default_direct_path", } if args.proxy_url: endpoint = args.proxy_url.strip() else: if not (args.proxy_username and args.proxy_password): raise ValueError( "residential_proxy 模式下,若未提供 --proxy-url,则必须提供 --proxy-username 和 --proxy-password" ) endpoint = ( f"http://{args.proxy_username}:{args.proxy_password}@" f"{args.proxy_host}:{args.proxy_port}" ) return { "enabled": True, "mode": "residential_proxy", "endpoint": endpoint, "host": args.proxy_host, "port": args.proxy_port, "rotate_per_request": args.proxy_rotate_per_request, "session_id": args.proxy_session_id, "geo": { "country": args.proxy_country, "state": args.proxy_state, "city": args.proxy_city, "zip": args.proxy_zip, }, } ``` The returned object is subsequently embedded in the generated payload and printed: ```python "network": { "path": args.network_path, "proxy": build_proxy_config(args), "akamai_block_recovery": { "enabled": args.network_path == "residential_proxy", "notes": [ "If direct path returns HTTP 403 Access Denied, switch to residential proxy.", "Use sticky session when product page requires multi-step render and cart checks.", ], }, }, ``` ```python if args.output_format == "json": print(json.dumps ...[truncated 2190 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_costco_inventory.py:35
Finding

Unrestricted Product URL Enables Arbitrary Outbound Requests

Content
View full analysis
dict: parts = spec.split("|", 2) if len(parts) != 3: raise ValueError(f"Invalid --product: {spec}") pid, name, url = [x.strip() for x in parts] return {"id": pid, "name": name, "url": url} def with_zip(url: str, zip_code: str) -> str: u = urlparse(url) q = dict(parse_qsl(u.query, keep_blank_values=True)) q["zipcode"] = zip_code new_query = urlencode(q) return urlunparse((u.scheme, u.netloc, u.path, u.params, new_query, u.fragment)) ``` The parsed URL is later requested without scheme or hostname validation: ```python for p in products: for z in zip_codes: check_url = with_zip(p["url"], z) rec = { "timestamp_utc": now, "run_fingerprint": run_fingerprint, "product_id": p["id"], "product_name": p["name"], "product_url": p["url"], "zip_code": z, "source": "html", } last_error = None attempts = max(1, args.retries) for attempt in range(1, attempts + 1): try: r = session.get(check_url, timeout=args.timeout) rec["http_status"] = r.status_code if r.status_code != 200: rec["availability"] = "unknown" rec["raw_excerpt"] = f"http_status={r.status_code}" else: availability, signal = availability_from_html(r.text) rec["availability"] = availability rec["raw_excerpt"] = signal last_error = None break ``` ### Technical Analy ...[truncated 2659 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (34)

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is related to Costco inventory monitoring, so it is partially aligned. However, the declared description says the skill monitors Costco inventory by ZIP and runs safely with OpenClaw cron, while this code chunk only constructs a configuration payload and outputs it. It does not perform monitoring or scheduling itself. More importantly, it includes substantial undeclared network/proxy capability: residential proxy selection, full proxy endpoint construction with credentials, session stickiness, geographic proxy targeting, and explicit Akamai/403 recovery notes. The description also emphasizes keeping secrets outside the skill directory, but this code accepts secrets directly via CLI and can embed them into output JSON. That makes the description incomplete and somewhat misleading relative to the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes a functional inventory-monitoring skill, but the supplied code chunk contains only tar/PaxHeader metadata and no actual Python logic. Because there is no visible implementation for monitoring Costco inventory, ZIP-based checks, cron execution, or secret management, the supplied code does not substantiate the declared behavior. This is a mismatch between the description and the actual provided content.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The provided code chunk is not meaningful Python implementing the declared inventory-monitoring behavior. Instead, it consists of PaxHeader/archive metadata lines such as mtime and provenance xattrs. Because the actual supplied content does not demonstrate the declared primary purpose or any supporting logic for Costco inventory checks, ZIP-based monitoring, or cron-safe execution, the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a Costco inventory monitor runnable by cron, but the supplied code chunk does not implement that purpose. Instead, it contains only tar/PaxHeader metadata and provenance attributes, with no shell commands, network access, ZIP-based inventory checks, scheduling logic, or secret-management behavior. Because the actual content is materially different from the declared purpose and provides no evidence of the stated functionality, this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The core Costco inventory/ZIP monitoring purpose is broadly aligned: this script prepares configuration for monitoring products by ZIP code. However, the declared description omits several materially significant behaviors present in the code. It supports residential proxy routing, proxy geo/session/rotation options, and anti-block recovery guidance, which are substantive network-access capabilities not reflected in the description. It also generates run fingerprints, including randomized identifiers to simulate browser rotation. Finally, although the description says to keep secrets outside the skill directory, the code accepts proxy credentials and may embed them directly into the produced config output via --proxy-url or constructed endpoint strings; the code itself does not enforce keeping secrets external. Because these are undeclared and security-relevant capabilities, this is a description/behavior mismatch.

Content

No source excerpt is available for this finding.

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Ae3

High
Category
analysis-evasion
Confidence
90% confidence
Finding

Text artifact contains embedded NUL bytes

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

bash
mkdir -p /root/.openclaw/workspace/.secrets
cp /root/.openclaw/workspace/skills/costco-inventory-monitor/config/monitor.env.example /root/.openclaw/workspace/.secrets/costco-monitor.env
chmod 600 /root/.openclaw/workspace/.secrets/costco-monitor.env
  1. Edit /root/.openclaw/workspace/.secrets/costco-monitor.env and fill real values:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · costco-inventory-monitor/SKILL.md (reported line 33)May include surrounding context.

bash
mkdir -p /root/.openclaw/workspace/.secrets
cp /root/.openclaw/workspace/skills/costco-inventory-monitor/config/monitor.env.example /root/.openclaw/workspace/.secrets/costco-monitor.env
chmod 600 /root/.openclaw/workspace/.secrets/costco-monitor.env
  1. Edit /root/.openclaw/workspace/.secrets/costco-monitor.env and fill real values:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The standard explicitly recommends high-frequency monitoring through residential proxies and session stickiness/rotation to bypass or work around anti-bot defenses, but it does not warn about privacy, legal/terms-of-service, consent, or third-party network impact. In this skill context, that omission is meaningful because the document operationalizes repeated scraping behavior and proxy evasion as a normal baseline, increasing the chance of misuse or deployment in ways that expose users to policy, abuse, or reputational risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a Costco inventory monitor run safely with cron, but this script adds extensive support for residential proxies, sticky sessions, geographic proxy targeting, and per-request rotation. Those anti-blocking and traffic-routing features are not obviously required by the stated purpose and introduce a materially broader capability than basic inventory monitoring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generated payload includes the proxy endpoint, and when credentials are supplied they are embedded directly in the URL and then printed in both JSON and pretty output. This can expose usernames and passwords to terminals, logs, CI output, shell history capture, or downstream systems that store generated configs.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The top-level docstring presents this file as a configuration builder for Costco inventory monitoring, while the generated configuration includes guidance for Akamai block recovery using residential proxies and sticky sessions. That documentation within the code signals a more evasive operational intent than the simple monitoring purpose stated in the module description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This shell script launches a Python monitor with --proxy-url and location/product inputs, which implies network requests and transmission of user-supplied monitoring data. There is no visible warning, confirmation prompt, or explanatory comment in the script about the external connectivity or data transmission.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guidance explicitly recommends residential proxies, sticky sessions, and rotation strategies to work around Akamai blocking during high-frequency monitoring, but provides no warning about legal, privacy, or third-party network impact. In the context of an inventory-monitoring skill, this normalizes evasion-oriented scraping behavior and can lead users to route traffic through sensitive proxy infrastructure without informed consent or risk awareness.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.