Skip to content

feat(pydantic-ai): Support ImageUrl content type in span instrumentation #424

feat(pydantic-ai): Support ImageUrl content type in span instrumentation

feat(pydantic-ai): Support ImageUrl content type in span instrumentation #424

Triggered via pull request March 10, 2026 15:45
Status Success
Total duration 6m 37s
Artifacts

warden.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 warnings
Regex fails to match valid MIME types, leaking base64 data instead of redacting it: sentry_sdk/integrations/pydantic_ai/consts.py#L7
The DATA_URL_BASE64_REGEX pattern `([a-zA-Z]+/[a-zA-Z]+)` only matches MIME types containing letters, but RFC 2046 allows digits, hyphens, periods, and plus signs. Valid data URLs like `data:image/svg+xml;base64,...` or `data:video/3gpp;base64,...` will not match, causing `_serialize_image_url_item` to fall through and return the full data URL including base64-encoded content that should be redacted.
[53N-D7M] Regex fails to match valid MIME types, leaking base64 data instead of redacting it (additional location): sentry_sdk/integrations/pydantic_ai/spans/utils.py#L29
The DATA_URL_BASE64_REGEX pattern `([a-zA-Z]+/[a-zA-Z]+)` only matches MIME types containing letters, but RFC 2046 allows digits, hyphens, periods, and plus signs. Valid data URLs like `data:image/svg+xml;base64,...` or `data:video/3gpp;base64,...` will not match, causing `_serialize_image_url_item` to fall through and return the full data URL including base64-encoded content that should be redacted.