T09 · Insecure Skill Coding Practices
- Location
tracker_core.py:169- Finding
Webhook callbacks are accepted without valid signatures by default
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its public webhook can accept weakly authenticated package updates that may change local package state and trigger Google Calendar changes.
Review this before installing. Use a high-entropy webhook token, set webhook.signatureMode to strict, configure a callback salt, and avoid exposing the webhook publicly unless needed. Be aware that package numbers, notes, delivery status, and latest tracking context may be stored locally and sent to Kuaidi100 or Google Calendar as part of normal operation.
tracker_core.py:169Webhook callbacks are accepted without valid signatures by default
index.ts:88Unbounded webhook body buffering permits memory-exhaustion denial of service
tracker_core.py:57Package tracking state is stored without explicitly restrictive file permissions
The code sends tracking numbers and callback configuration to Kuaidi100, an external service, as part of subscription setup. In this skill's context that may be functional, but it is still a privacy-relevant external transmission and there is no evidence in this file of consent or data-minimization around sharing package identifiers and webhook details.
headers={"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
method="POST",
)
with urllib.request.urlopen(req, timeout=20) as resp:
return json.loads(resp.read().decode())
except Exception as e:
return {"error": str(e)}
The code automatically uploads package details, including notes and delivery context, into Google Calendar whenever a shipment is inferred to be out for delivery. This creates a real privacy risk because potentially sensitive shipment metadata is transmitted to a third party and persisted in calendar entries without any confirmation gate in this component.
req = urllib.request.Request(url, data=json.dumps(body).encode(), headers=headers, method="POST")
action = "created"
with urllib.request.urlopen(req, timeout=15) as resp:
result = json.loads(resp.read())
return {"action": action, "event_id": result.get("id"), "summary": body["summary"]}
The Kuaidi100 subscription request is sent to an endpoint fully configurable by the KUAIDI100_SUB_ENDPOINT environment variable, and the request body includes sensitive API material and webhook registration data. If that environment variable is tampered with, the skill can exfiltrate credentials or send privileged subscription requests to an attacker-controlled host, making this more dangerous because the code handles third-party API secrets.
headers={"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
method="POST",
)
with urllib.request.urlopen(req, timeout=20) as resp:
return json.loads(resp.read().decode())
except Exception as e:
return {"error": str(e)}
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/x-www-form-urlencoded"},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read())["access_token"]
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/x-www-form-urlencoded"},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read())["access_token"]
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/x-www-form-urlencoded"},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read())["access_token"]
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/x-www-form-urlencoded"},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read())["access_token"]
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
headers={"Content-Type": "application/x-www-form-urlencoded"},
method="POST",
)
with urllib.request.urlopen(req, timeout=15) as resp:
return json.loads(resp.read())["access_token"]
The README explains subscription to Kuaidi100 push updates and webhook processing, but it does not plainly disclose that tracking numbers and shipment status data are sent to Kuaidi100 and received through a public webhook workflow. This can expose personal shipment metadata to external services and infrastructure, which is especially relevant because package tracking numbers and delivery states can reveal user habits, location patterns, and expected deliveries.
The README explains subscription to Kuaidi100 push updates and webhook processing, but it does not plainly disclose that tracking numbers and shipment status data are sent to Kuaidi100 and received through a public webhook workflow. This can expose personal shipment metadata to external services and infrastructure, which is especially relevant because package tracking numbers and delivery states can reveal user habits, location patterns, and expected deliveries.
The skill defines and uses a local state file for package-tracker data, which implies file writes to the user's workspace state area. In this JavaScript file, there is no confirmation prompt or direct user-facing warning that package data will be stored locally.
Webhook handling automatically calls the Python core to process push data and may sync delivery reminders to Google Calendar, transmitting package-related data to an external service. Although the plugin description mentions auto-adding reminders, this code path provides no explicit user-facing warning at the time of automatic transmission.
Several tool descriptions specify only Chinese example utterances such as 'Use when user says: 给我加个快递单号' and similar phrases. This creates a natural-language locale bias without explicit user opt-in or a documented justification that the skill is restricted to Chinese-language interactions.
The list_packages tool uses only Chinese example requests for invocation guidance, reinforcing a Chinese-only interaction model. Without explicit opt-in or documented regional scope, this conflicts with language/locale neutrality expectations.
The sync_to_calendar tool description provides only Chinese trigger examples. This indicates a forced locale in natural-language guidance without user choice or an explicit, justified locale constraint.
The remove_tracking_number tool description again restricts example user phrasing to Chinese only. This is a natural-language locale policy concern unless the skill explicitly documents a Chinese-only scope.
The skill persists package data locally, including tracking numbers, notes, delivery status, and raw status text, without any disclosure in this file. While local persistence is common, undisclosed storage of potentially sensitive shipment information increases privacy risk, especially in shared environments or when the default path is under a user home directory.
This code transmits package metadata and user notes to Google Calendar, which is a third-party service, without any visible user warning or approval flow in this file. Because notes may contain arbitrary personal information, the privacy impact is higher than a generic calendar sync.
Several tool descriptions specify activation examples only in Chinese, such as 'Use when user says' followed exclusively by Chinese phrases. This creates a natural-language policy concern because the skill appears to assume or require a specific language without explicit user opt-in or a documented locale limitation.
The manifest text says the skill tracks "Chinese domestic packages" and the schedule configuration defaults the timezone to "Asia/Shanghai" without presenting this as a user choice. Under the policy rule, forcing a specific locale is a natural-language policy concern unless it is clearly documented as a justified region-specific tool or offered as opt-in.
The plugin exposes a public webhook and documents a default signature mode of "soft," which effectively allows callbacks to be accepted without strict signature validation. For an internet-reachable endpoint that can influence package state and trigger downstream actions like calendar reminder creation, this weak authentication increases the risk of spoofed requests, event injection, and abuse of the exposed callback surface.
The code defaults TIMEZONE_NAME to Asia/Shanghai, imposing a specific locale setting when the user has not explicitly chosen one. This matches the policy category for language/locale constraints because the skill behavior is region-specific by default rather than opt-in.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
def save_state(state: dict) -> None:
STATE_FILE.parent.mkdir(parents=True, exist_ok=True)
STATE_FILE.write_text(json.dumps(state, ensure_ascii=False, indent=2))
# ── Kuaidi100 subscribe API ────────────────────────────────────────────────────
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
def save_state(state: dict) -> None:
STATE_FILE.parent.mkdir(parents=True, exist_ok=True)
STATE_FILE.write_text(json.dumps(state, ensure_ascii=False, indent=2))
# ── Kuaidi100 subscribe API ────────────────────────────────────────────────────
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# ── Kuaidi100 subscribe API ────────────────────────────────────────────────────
# Docs: https://api.kuaidi100.com/document/subscribeApi
# Sign = MD5(param + key + customer).upper()
# Endpoint: POST https://poll.kuaidi100.com/poll
# Form fields: schema=json, param=<json>, sign=<sign>, key=<customer>