T09 · Insecure Skill Coding Practices
- Location
scripts/wait_for_task.py:35- Finding
API Credential Exposed in HTTP Query Strings
- Content
View full analysis
") ``` Authentication through an `Authorization` header is already used elsewhere in the project and is a less exposed transport mechanism. Query-string authentication therefore exceeds the minimum credential exposure necessary for the operation. ### Attack Path 1. A user configures `DATAIFY_API_TOKEN` and submits a normal Dataify task. 2. `wait_for_task()` calls `request_json()` to poll task status. 3. The function constructs a URL such as: `https://scraperapi.dataify.com/task_status?ap ...[truncated 678 chars]- Remediation
View remediation
`, consistent with the other Dataify clients in the project. - Prefer POST requests for operations that cannot safely be represented without sensitive parameters in a URL. - If the upstream API only supports query-string credentials, request a safer authentication contract from the service provider. - Until the API is changed, use short-lived, narrowly scoped credentials and configure strict URL-query redaction in proxies, servers, logging systems, and telemetry. - Add automated tests asserting that generated request URLs never contain `DATAIFY_API_TOKEN`. - Rotate any credentials that may already have appeared in request logs. ]]>
