Skip to main content

Module security

Module security 

Source
Expand description

Shared security helpers for AI client implementations. Shared security helpers for AI provider clients.

These helpers centralize precautionary checks that every AI client should perform before sending credentials over the wire.

Functions§

warn_on_insecure_http
Emit a warning if the parsed url uses plaintext HTTP against a non-local host while an API key is configured, because the API key would be sent unencrypted.
warn_on_insecure_http_str
Convenience wrapper that parses url_str and forwards to warn_on_insecure_http. Parse errors are silently ignored because the caller’s existing URL validation will have already rejected malformed URLs.