fix(guardrails): authorize vertexCredential before use in hallucination validation#5400
Conversation
…on validation The guardrails validate route now checks credential access via authorizeCredentialUse before passing a caller-supplied vertexCredential into hallucination validation, matching the existing pattern already used in the providers route for the same field.
PR SummaryMedium Risk Overview The validate route now calls Adds Reviewed by Cursor Bugbot for commit 9f8e410. Configure here. |
…provider Only run the credential check when the model actually resolves to vertex, matching the providers route's gating exactly, and drop a redundant fallback now that workflowId is already guaranteed present at that point.
|
@greptile review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9f8e410. Configure here.

Summary
vertexCredentialviaauthorizeCredentialUsebefore it's used in hallucination validation, matching the existing check already used in the providers route for the same field.Type of Change
Testing
apps/sim/app/api/guardrails/validate/route.test.tscovering the new authorization gate.bun run vitest run app/api/guardrails/validate/route.test.tspasses (4/4).Checklist