Skip to content

[Security] Enforce ocr_json_safety validators on all image_base64 inputs#2885

Open
sanrishi wants to merge 1 commit into
ritesh-1918:gssocfrom
sanrishi:fix/ocr-safety-enforcement
Open

[Security] Enforce ocr_json_safety validators on all image_base64 inputs#2885
sanrishi wants to merge 1 commit into
ritesh-1918:gssocfrom
sanrishi:fix/ocr-safety-enforcement

Conversation

@sanrishi

Copy link
Copy Markdown

Validates base64 image input before passing to OCR/Gemini services. Fixes #2872

- Add _safe_image_base64() helper that delegates to sanitize_and_validate_base64_image()
- Apply validation before OCR extraction in analyze_ticket
- Apply validation before Gemini vision in analyze_only and analyze_stream
- Log warnings on validation failures instead of silently passing raw base64

Fixes ritesh-1918#2872
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8c89242-fd67-4c36-ba27-a84e779ea608

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant