T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:23
- Finding
- Unauthenticated State-Changing API Exposed over Plaintext HTTP## Vulnerability Details **File Location**: `SKILL.md`, lines 23–96 **Vulnerability Type**: Unauthenticated plaintext API access **Risk Level**: High ### Vulnerable Code ```markdown ## API Base http://100.102.77.110:8005 ## Integration Endpoints (No Auth Required) ### Record Maintenance Completion POST /api/integration/record-completion Content-Type: application/json Body: ```json { "schedule_id": 1, "equipment_id": 5, "performed_at": "2026-02-13T10:00:00Z", "performed_by": "user_name", "equipment_hours": 1250, "work_performed": "Changed engine oil and filter", "parts_used": [], "task_id": null } ``` Use this when someone reports maintenance was done. ``` The same document also defines another state-changing endpoint: ```markdown POST /api/equipment/{id}/hours — Log hour meter reading: {"hours": 1500, "recorded_at": "2026-02-13"} ``` ### Technical Analysis The skill directs the agent to communicate with a fixed private-network API using plaintext HTTP and explicitly states that the integration endpoints require no authentication. The exposed functionality includes both fleet-data retrieval and state-changing operations, such as recording maintenance completion and updating equipment hour-meter readings. Plaintext HTTP does not provide transport confidentiality, server authentication, or integrity protection. An attacker with access to a network segment through which the requests pass may inspect or alter requests and responses. Because the integration API does not require authentication, any party capable of reaching the service may also be able to invoke its documented endpoints directly without stealing credentials. The affected records are operationally significant. Maintenance schedules and hour readings are used to determine whether equipment is due or overdue for service. Forged completion records or altered hour readings could therefore cause maintenance requirements to appear satisfied when they are not. The hardcoded inter ...[truncated 2072 chars]
- Remediation
- ## Remediation Suggestions 1. Replace plaintext HTTP with HTTPS and require proper certificate and hostname validation. 2. Require authentication for every endpoint, including read-only integration endpoints. Use short-lived service credentials or another centrally managed identity mechanism rather than embedding credentials in the skill file. 3. Apply authorization checks independently on the server. Restrict maintenance completion and meter updates to identities with explicit write permissions. 4. Separate read and write privileges so an identity used for routine status queries cannot alter maintenance records. 5. Require explicit user confirmation immediately before consequential state-changing requests, except where a separately approved emergency workflow applies. 6. Validate all submitted identifiers, timestamps, equipment-hour values, personnel fields, and text fields on the server. 7. Maintain append-only audit logs containing the authenticated actor, timestamp, source, previous value, new value, and request identifier. 8. Add replay resistance and idempotency controls to maintenance-completion requests. 9. Provide correction or review workflows for suspicious maintenance and hour-meter changes, and alert on implausible readings or duplicate completions. 10. Move the API base address into trusted deployment configuration instead of hardcoding it in the skill documentation. 11. Limit network access to the API through firewall rules, service segmentation, or an authenticated gateway. Network restrictions should supplement rather than replace authentication. 12. Review existing records for unauthorized or anomalous updates made while the endpoints were unauthenticated.
