fix: harden sign-in classification + align take-over messaging - #3527
Merged
Conversation
Addresses review findings on the browser sign-in path: - Treat the browser's current URL as untrusted data in the classification prompt (labeled, delimited) so page-path text can't steer the outcome; the query and fragment were already stripped. - Tighten the 2FA-method classifier so a device approval, push notification, or email/SMS link is classified as 'other' rather than over-matching a passkey. - Align the take-over toast and panel to one decision, so they can't contradict (e.g. an 'enter your code' toast over a 'finish sign-in' panel). - Add direct unit tests for classifyLoginOutcome (each outcome, throw -> unknown, URL passed as untrusted with secrets stripped, content-only when no URL).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…scape A non-http(s) page URL (data:, about:, javascript:, …) isn't percent-encoded and could carry characters that break out of the <current_url> delimiter. Restrict the URL hint to http(s) origins and XML-escape the value before interpolation, so it always stays inside its tag as data. Adds tests for both.
claudfuen
pushed a commit
that referenced
this pull request
Jul 29, 2026
# [3.111.0](v3.110.1...v3.111.0) (2026-07-29) ### Bug Fixes * **api:** classify the take-over method on an unclear outcome too ([539fdba](539fdba)) * **api:** only classify a switchable passkey when a code method exists ([#3528](#3528)) ([0d79093](0d79093)) * **app:** make a half-finished connect resumable, not a forced full-screen step ([#3525](#3525)) ([b1afcae](b1afcae)) * **cloud-security:** add missing logGroupName to CreateLogGroup remediation ([#3515](#3515)) ([76ae56c](76ae56c)) * harden sign-in classification + align take-over messaging ([#3527](#3527)) ([914cb1e](914cb1e)) * **integrations:** wrap aws add account form in dialog and scroll into view ([#3526](#3526)) ([07e91ae](07e91ae)), closes [#418](#418) * make the 2FA take-over universal — tailor guidance to what the page asks for ([#3520](#3520)) ([b12f3fe](b12f3fe)) * **policies:** remove archived policies from framework controls after unlinking ([#3513](#3513)) ([d639df2](d639df2)) * **training:** defer completion email and share canonical training IDs ([#3529](#3529)) ([fecb556](fecb556)) * **training:** remove rbac gate from mark-complete endpoint ([#3501](#3501)) ([8c5e98f](8c5e98f)), closes [#3455](#3455) ### Features * connection longevity + one-click 'Make permanent' 2FA ([#3524](#3524)) ([7345e3c](7345e3c)) * **policies:** add bulk upload for policy migration ([#3514](#3514)) ([1940f06](1940f06)) * **security-questionnaire:** add browser extension ([#3064](#3064)) ([e678421](e678421))
Contributor
|
🎉 This PR is included in version 3.111.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Addresses the review findings on our browser sign-in code surfaced in the production-deploy PR (#3521). These touch code merged via #3520; fixes go to
main(not the deploy PR).browser-login-classifier): the browser's current URL is now passed to the classification prompt labeled + delimited as untrusted, so page-path text can't steer the outcome. (Query/fragment were already stripped bysafeOriginAndPath.)otherinstead of over-matching a passkey — so take-over guidance matches the page.ConnectVendorLoginFlow): the toast and the panel now derive from the same decision, so they can't contradict (e.g. an "enter your code" toast over a "finish sign-in" panel).classifyLoginOutcome: each outcome, throw →unknown, URL passed as untrusted with secrets stripped, and content-only when no URL is available.Not included (deliberately)
Two other findings on #3521 are the training team's (
portal/complete-training), not this feature — left for them.Notes
The two classifier changes are prompt/LLM hardening (behavior isn't 100% guaranteed), but they're low-risk and improve correctness; the take-over flow stays interactive, so it degrades gracefully.
Tests
210 API tests (29 suites) + 96 app browser-automations tests green; both apps typecheck clean.
Summary by cubic
Hardens browser sign-in classification and makes take-over messaging consistent. Blocks URL-steered misclassification, delimiter injection, and conflicting toast/panel guidance.
safeOriginAndPath, ignore non-http(s) schemes, and XML-escape the value.other; only explicit passkey prompts →passkey/passkey_only.ConnectVendorLoginFlowtoast and panel to the same decision (2FA vs finish) to avoid contradictions.classifyLoginOutcome: each outcome, errors →unknown, content-only with no URL, sanitized URL stays inside<current_url>, and non-http(s) URLs are dropped.Written for commit d9e1c56. Summary will update on new commits.