T09 · Insecure Skill Coding Practices
- Location
scripts/order-guard.py:57- Finding
WooCommerce credentials and customer data may be transmitted without secure transport
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill matches its stated WooCommerce automation purpose, but it automatically changes live order address data using stored API credentials without enough safeguards.
Review before installing in production. Use a least-privilege WooCommerce API key, require an HTTPS store URL, protect the credentials file, test on staging first, and consider adding a dry-run/apply mode plus response checks before allowing automatic address updates.
scripts/order-guard.py:57WooCommerce credentials and customer data may be transmitted without secure transport
scripts/order-guard.py:75Failed shipping-address updates are recorded as successfully processed
The docstring materially understates the script’s behavior by claiming it only fetches processing orders and emits alerts, while the implementation also performs authenticated remote updates to WooCommerce orders. This mismatch is dangerous because operators may deploy or approve the script under false assumptions, leading to unauthorized or unexpected modification of customer order records and shipping details.
The skill explicitly states that it will auto-fix missing shipping addresses by copying billing data into shipping fields, but the description does not prominently warn that this changes live WooCommerce order records. That omission can cause operators to run it in production without understanding that customer/order data will be modified automatically, increasing the risk of unintended fulfillment errors, privacy issues, and hard-to-trace data integrity problems.
The script automatically modifies order shipping data over authenticated HTTP without operator confirmation, approval workflow, or even checking the PUT response for success. In this skill context, the action touches real e-commerce order records and customer address data, so silent automation increases the chance of unintended data corruption, privacy issues, or propagation of bad billing data into shipping fields.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
if not shipping.get('address_1'):
update_data = {"shipping": copy_billing_to_shipping(order)}
requests.put(f"{url}/wp-json/wc/v3/orders/{order_id}", auth=auth, json=update_data)
alerted_orders.append(order_id)
print(f"NEW_ORDER_ID: {order_id}")
The script loads consumer credentials from a local file and uses them to authenticate WooCommerce API requests. While this is functionally necessary, the file does not provide a clear user-facing warning that sensitive credentials are being accessed and used for remote authenticated operations.