Back to skill

Security audit

Parcel Tracking

Security checks for vulnerabilities and agentic risk

Overview

This parcel-tracking skill matches its purpose, but it can send shipment details and the Track123 API secret to any configured API endpoint, so it should be reviewed before installation.

Install only if you trust the publisher and can ensure TRACK123_API_BASE remains the official Track123 HTTPS endpoint. Treat tracking numbers and postal codes as personal shipment information, and prefer a narrowly scoped Track123 API secret that can be rotated if misconfigured.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
track.py:10
Finding
Unrestricted API Base URL Exposes Credentials and Shipment Data<![CDATA[ ## Vulnerability Details **File Location**: `track.py:10-38` **Vulnerability Type**: Server-Side Request Forgery and sensitive-data disclosure through an unvalidated configurable endpoint **Risk Level**: Medium ### Vulnerable Code ```python def get_api_base() -> str: return os.getenv("TRACK123_API_BASE", "https://api.track123.com/gateway/open-api/tk/v2") def get_api_secret() -> str: secret = os.getenv("TRACK123_API_SECRET") if not secret: raise RuntimeError("TRACK123_API_SECRET not set") return secret def api_headers() -> Dict[str, str]: return { "Track123-Api-Secret": get_api_secret(), # Track123 Header[web:35] "accept": "application/json", "content-type": "application/json", } def query_track123(tracking_number: str, postal_code: str | None) -> Dict[str, Any]: """ Track123 /track/query – auto-detect mit leerem courierCode.[web:35] """ url = f"{get_api_base()}/track/query" payload = { "trackNos": [tracking_number], "orderNos": [""], "queryPageSize": 1, } if postal_code: payload["postalCode"] = postal_code # Für Filterung/Erweiterung[web:35] resp = requests.post(url, headers=api_headers(), json=payload) ``` ### Technical Analysis The `TRACK123_API_BASE` environment variable is accepted without validating its URL scheme, hostname, port, or resolved destination. The application then unconditionally attaches the `TRACK123_API_SECRET` header and submits the user's tracking number and optional postal code to that destination. An attacker who can influence the process environment or deployment configuration can set the base URL to an attacker-controlled server. The code also accepts plaintext HTTP URLs, allowing the API secret and shipment data to be transmitted without transport encryption. Because `requests.post()` follows redirects by default, redirect handling should also be constrained so the custom secret header cannot re ...[truncated 1849 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Enforce HTTPS** - Parse the configured URL with `urllib.parse.urlparse`. - Reject every scheme other than `https`. - Reject URLs containing embedded credentials. 2. **Allowlist trusted destinations** - Prefer a fixed Track123 endpoint in production. - If configuration is necessary, require the normalized hostname to exactly match `api.track123.com`. - Validate the effective port and reject unexpected ports. - Do not rely on suffix matching such as `endswith("track123.com")`, which can accept attacker-controlled lookalike domains. 3. **Constrain redirects** - Disable automatic redirects with `allow_redirects=False`. - Alternatively, inspect each redirect target and resend the credential only when the destination remains on the exact trusted HTTPS origin. 4. **Reduce credential exposure** - Attach `Track123-Api-Secret` only after the destination has passed validation. - Use a narrowly scoped API credential where the provider supports scopes. - Rotate the credential immediately if an untrusted endpoint may previously have been configured. 5. **Add network-level restrictions** - Restrict outbound traffic for the skill process to the official Track123 API host. - Block access to loopback, link-local, private, and cloud metadata addresses where feasible. 6. **Harden request handling** - Add explicit connection and read timeouts. - Place reasonable limits on response sizes. - Return sanitized errors that do not expose credentials or unnecessary endpoint details. A secure implementation should validate the origin before constructing headers, for example: ```python from urllib.parse import urlparse TRUSTED_HOST = "api.track123.com" def get_api_base() -> str: base = os.getenv( "TRACK123_API_BASE", "https://api.track123.com/gateway/open-api/tk/v2", ).rstrip("/") parsed = urlparse(base) if ( parsed.scheme != "https" or parsed.ho ...[truncated 385 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (9)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares network access and use of environment-provided secrets but does not declare an explicit tool scope or permissions boundary. That omission reduces transparency and reviewability, making it easier for a skill to access sensitive capabilities without clear user or platform consent semantics.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill advertises optional postal code input for enhanced results without warning that the postal code may also be shared with the external tracking provider. Postal code combined with shipment identifiers increases sensitivity and can expose location-related personal data beyond what users may expect.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill advertises optional postal code input for enhanced results without warning that the postal code may also be shared with the external tracking provider. Postal code combined with shipment identifiers increases sensitivity and can expose location-related personal data beyond what users may expect.

External Transmission

Medium
Category
Data Exfiltration
Content
description: Track123 API-Secret (aus deinem Account: Developer > Webhook/API).[web:34]
      - name: TRACK123_API_BASE
        required: false
        default: "https://api.track123.com/gateway/open-api/tk/v2"
        description: Track123 API-Base-URL.
    os: ["linux", "darwin"]
Confidence
84% confidence
Finding
The skill is configured to communicate with an external API endpoint, which confirms off-platform transmission of shipment-related data and use of an API secret. In this skill's context, external transmission is functionally necessary, but it remains security-relevant because it exposes user data and secrets to third-party infrastructure.

External Transmission

Medium
Category
Data Exfiltration
Content
print(json.dumps(obj, ensure_ascii=False, indent=2))

def get_api_base() -> str:
    return os.getenv("TRACK123_API_BASE", "https://api.track123.com/gateway/open-api/tk/v2")

def get_api_secret() -> str:
    secret = os.getenv("TRACK123_API_SECRET")
Confidence
87% confidence
Finding
The code is explicitly designed to contact an external API endpoint and transmit shipment identifiers and optional postal codes off-host. In the context of a parcel-tracking skill this behavior is expected, but it still represents a genuine external data-transfer risk because sensitive user data is sent to a third party and trust is placed in an environment-configurable endpoint.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill sends the user-provided tracking number and optional postal code to Track123, a third-party external service, but the code itself contains no disclosure, consent check, or privacy notice. Tracking numbers and postal codes can reveal shipment activity and approximate location, so silent transmission to an external processor creates a real privacy and data-handling risk.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
Confidence
93% confidence
Finding
The dependency is specified as `requests>=2.31.0`, which allows any newer version to be installed without review. This weakens reproducibility and can unintentionally pull in a vulnerable or breaking release through normal installs or future supply-chain compromise. In this skill, the package is used for network access to a third-party tracking API, so keeping dependency behavior predictable is important.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding
The manifest references `requests` without pinning an exact version, while multiple advisories exist across its release history. Because the resolved version is unknown, deployments could install a release affected by issues such as credential leakage or TLS-related flaws, especially concerning for a skill that performs outbound HTTP requests to external services.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
Several user-visible strings in the formatted output are fixed in German, including labels such as 'Paketdienst', 'Sendungsnummer', and 'Verlauf'. This imposes a specific language on users without any opt-in or configuration, which matches the language/locale policy concern described.

Static analysis

Detected: suspicious.dynamic_code_execution, suspicious.exposed_secret_literal, suspicious.insecure_tls_verification

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
venv/lib/python3.14/site-packages/pip/_vendor/pygments/formatters/__init__.py:91

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_internal/network/auth.py:97

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/requests/adapters.py:257

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/requests/sessions.py:322

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/connection.py:423

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/connectionpool.py:991

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py:231

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/socks.py:102

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/requests/adapters.py:257

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/requests/sessions.py:322

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/urllib3/connection.py:807

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/urllib3/connectionpool.py:1073

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
venv/lib/python3.14/site-packages/urllib3/contrib/socks.py:116

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_internal/network/session.py:312

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/truststore/_macos.py:371

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/truststore/_windows.py:458

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/connection.py:454

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py:113

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/contrib/securetransport.py:794

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/pip/_vendor/urllib3/util/ssl_.py:140

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/urllib3/connection.py:951

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:84

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
venv/lib/python3.14/site-packages/urllib3/util/ssl_.py:353