'TasksResource.create builds the JSON body from all keyword params and separately uses params.get("idempotency_key") for the Idempotency-Key header. Because _payload includes every non-None param, calling client.tasks.create(..., idempotency_key="idem") sends {"idempotency_key":"idem"} in the request body as well as the header. The same pattern exists for video creation. Strip SDK-only header params before building the JSON payload.
File: src/globalrouter/_resources.py
Line: 385
Severity: medium
Summary: idempotency key leaked into create payloads
'TasksResource.createbuilds the JSON body from all keyword params and separately usesparams.get("idempotency_key")for theIdempotency-Keyheader. Because_payloadincludes every non-None param, callingclient.tasks.create(..., idempotency_key="idem")sends{"idempotency_key":"idem"}in the request body as well as the header. The same pattern exists for video creation. Strip SDK-only header params before building the JSON payload.File:
src/globalrouter/_resources.pyLine: 385
Severity: medium
Summary: idempotency key leaked into create payloads