Back to skill

Security audit

AFOL BrickLink

Security checks for vulnerabilities and agentic risk

Overview

This BrickLink skill is mostly coherent, but needs Review because its CLI can send OAuth-signed requests and marketplace data to an arbitrary API base URL if that option or environment variable is changed.

Review before installing. Use it only with a BrickLink account whose OAuth permissions you are comfortable exposing to this tool, leave BRICKLINK_API_BASE_URL unset or set exactly to the official BrickLink API URL, and check generated commands before approving --yes. Treat dry-run output as private because request bodies may appear in terminal or agent logs.

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

Error
Location
scripts/bricklink_cli.py:58
Finding

Unrestricted API Base URL Can Disclose OAuth Material and Private Marketplace Data

Content
View full analysis
Any: method = method.upper() params = clean_params(params or {}) url = f"{self.base_url}{path}" if params: url = f"{url}?{urllib.parse.urlencode(params, doseq=True)}" data = None headers = {"Accept": "application/json"} if body is not None: data = json.dumps(body, separators=(",", ":")).encode("utf-8") headers["Content-Type"] = "application/json" headers["Authorization"] = self.oauth_header(method, url) request = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(request, timeout=self.timeout) as response: raw = response.read().decode("utf-8") ``` ```python def add_common(parser: argparse.ArgumentParser) -> None: parser.add_argument("--base-url", default=os.getenv("BRICKLINK_API_BASE_URL", DEFAULT_BASE_URL), help="BrickLink API base URL") parser.add_argument("--timeout", type=int, default=READ_TIMEOUT_SECONDS, help="HTTP timeout in seconds") ``` ### Technical Analysis The API destination is controlled through either the `--base-url` command-line argument or the `BRICKLINK_API_BASE_URL` environment variable. No validation restricts the scheme, hostname, port, user-information component, or final destination. The client creates an OAuth 1.0 Authorization header for the resulting URL and sends the request to it. That header contains the OAuth consumer key, token value, nonce, timestamp, signature method, and request signature. OAuth consumer and token secrets are not directly placed in the header, but the exposed token identifier and signed request remain sensitive authen ...[truncated 1973 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/bricklink_cli.py:144
Finding

Dry-Run Output Exposes Complete Potentially Sensitive Request Bodies

Content
View full analysis
None: print_json( { "dry_run": True, "command": command, "method": method.upper(), "path": path, "query": clean_params(params or {}), "json_body": body, "auth": "OAuth1 from BRICKLINK_API_* environment variables", } ) ``` ### Technical Analysis Dry-run mode correctly avoids network access and does not print OAuth credential values. However, it emits the complete query and JSON body without field-level redaction. Supported request bodies can include private member notes, feedback text, coupon recipient details, order-related information, and inventory data. Standard output is commonly captured by terminal logs, agent transcripts, continuous-integration systems, automation platforms, and monitoring tools. As a result, private marketplace content can persist outside the intended BrickLink request flow. This behavior is inconsistent with the skill documentation's instruction to treat order, buyer, payment, coupon, and private-note data as private and to summarize only what is needed. ### Attack Path 1. A user or agent prepares a mutating request containing sensitive content, such as a private member note or order-related payload. 2. The command is invoked with `--dry-run`, as recommended by the skill workflow. 3. `dry_run()` serializes the complete body under `json_body`. 4. The full payload is printed to standard output. 5. A surrounding agent framework, shell logger, CI system, or transcript recorder stores the output. 6. A person or service with access to those logs can read the private data without needing BrickLink ac ...[truncated 520 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- CLI source: `scripts/bricklink_cli.py`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- CLI source: `scripts/bricklink_cli.py`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- `POST /inventories` via `inventory-create --yes`
- `GET /inventories/{inventory_id}` via `inventory`
- `PUT /inventories/{inventory_id}` via `inventory-update --yes`
- `DELETE /inventories/{inventory_id}` via `inventory-delete --yes`
- `GET /items/{type}/{no}` via `item`
- `GET /items/{type}/{no}/images/{color_id}` via `item-images`
- `GET /items/{type}/{no}/supersets` via `item-supersets`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- `GET /categories`, `GET /categories/{category_id}` via `categories`, `category`
- `GET /notifications` via `notifications`
- `GET /coupons`, `GET /coupons/{coupon_id}` via `coupons`, `coupon`
- `POST /coupons`, `PUT /coupons/{coupon_id}`, `DELETE /coupons/{coupon_id}` via guarded coupon commands
- `GET /settings/shipping_methods`, `GET /settings/shipping_methods/{method_id}` via shipping commands
- `GET /members/{username}/ratings` via `member-ratings`
- `GET /members/{username}/my_notes` via `member-notes`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- `GET /settings/shipping_methods`, `GET /settings/shipping_methods/{method_id}` via shipping commands
- `GET /members/{username}/ratings` via `member-ratings`
- `GET /members/{username}/my_notes` via `member-notes`
- `POST/PUT/DELETE /members/{username}/my_notes` via guarded member-note commands
- `GET /item_mapping/{type}/{no}` via `item-mapping`
- `GET /item_mapping/{element_id}` via `element-mapping`

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes capabilities that can access environment variables and make network requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: a host agent may grant broader access than intended, including access to OAuth credentials and live marketplace APIs, without a machine-readable restriction boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This manifest-style OpenAPI file defines destructive operations such as deleting store inventory, but the endpoint summary and description present the action plainly without any warning about irreversible data changes. Under the markdown/manifest-style warning criterion, users of the skill are not alerted that invoking this operation can permanently remove marketplace data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The API spec exposes a delete operation for coupons with no cautionary language indicating that the action removes an existing coupon and may not be recoverable. This omits user-facing disclosure for a destructive operation that can affect store data and buyer interactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The delete operation for member notes describes the action tersely but does not disclose that it removes stored notes and may not be reversible. For a manifest/API description, this is a missing safety warning for a data-affecting destructive action.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
import urllib.request
from typing import Any, Iterable

DEFAULT_BASE_URL = "https://api.bricklink.com/api/store/v1"
READ_TIMEOUT_SECONDS = 30
WRITE_METHODS = {"POST", "PUT", "DELETE"}
REQUIRED_ENV = (

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/openapi/bricklink.yaml (reported line 14)May include surrounding context.

yaml
import urllib.request
from typing import Any, Iterable

DEFAULT_BASE_URL = "https://api.bricklink.com/api/store/v1"
READ_TIMEOUT_SECONDS = 30
WRITE_METHODS = {"POST", "PUT", "DELETE"}
REQUIRED_ENV = (

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/bricklink_cli.py (reported line 25)May include surrounding context.

python
import urllib.request
from typing import Any, Iterable

DEFAULT_BASE_URL = "https://api.bricklink.com/api/store/v1"
READ_TIMEOUT_SECONDS = 30
WRITE_METHODS = {"POST", "PUT", "DELETE"}
REQUIRED_ENV = (

Static analysis

No suspicious patterns detected.