Please report security issues privately. Do not open a public GitHub issue for a vulnerability.
- Email: security@cotizave.com
- Or use GitHub's private vulnerability reporting on this repository.
Include a description, reproduction steps, affected versions, and impact. We aim to acknowledge within a few business days and will coordinate a fix and disclosure timeline with you.
This SDK is designed for server-side use.
- Never embed a private API key in a browser bundle, a mobile app, or any client-side code.
- Load the key from a server-side secret (environment variable or secret manager), never from source control.
- The client reads
COTIZAVE_API_KEYfrom the environment when noapi_keyis passed, so the key never needs to appear in your source.
The SDK sends your key only as the X-API-Key header to the configured
base_url, never in a URL or query string. It is not exposed on client.config,
in repr(), or in error messages; the SDK does not log the key, persist it, or
send telemetry.
- Origin pinning. Every request is pinned to the configured origin. A path
that resolves to a different host is refused (
invalid_request_path), so a crafted path cannot send your key elsewhere. - No redirects. Redirects are never followed; a redirect response is turned
into an error (
unexpected_redirect), preventing the key from being forwarded to another origin. - HTTPS required. A non-HTTPS
base_urlis rejected unless you explicitly setallow_insecure_http=True(intended only for local testing). - Response-size cap. Bodies are capped at
max_response_bytes(default 25 MB) to guard against an oversized or decompression-bomb response.
- The package has a single runtime dependency: httpx (BSD-3-Clause).
- Releases are built on GitHub-hosted runners and published to PyPI with Trusted Publishing (OIDC) — no long-lived API token is stored.
The latest released version receives security fixes. Pin a version and upgrade promptly when a security release is published.