fix(security): address review on elicitation credential flow - #362
Merged
gaurav-singh-9227 merged 1 commit intoAug 6, 2026
Merged
Conversation
- createAccessibilityAuthConfig: fire trackMCP on the missing-credentials path and wrap the handler in try/catch so getClientCapabilities() failures route through handleMCPError instead of throwing raw. - createLCASteps: when requires_authentication is set but no credentials could be obtained (client can't elicit or the user declined), return a clear error instead of silently creating a login test case with no credentials — mirrors the accessibility tool. - elicit-credentials: do not log the raw elicitation error (a client validation error can echo the submitted password); log a static warning instead, and type the result as ElicitResult. - Trim the new .describe() strings back within the context-window budget. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gaurav-singh-9227
approved these changes
Aug 6, 2026
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.
Summary
Follow-up to #361 (credential elicitation for
createAccessibilityAuthConfigandcreateLCASteps), addressing review findings on the elicitation flow.Changes
createAccessibilityAuthConfignow firestrackMCPon the missing-credentials return path (previously untracked when the user declines or the client can't elicit), and the handler is wrapped in try/catch so agetClientCapabilities()failure routes throughhandleMCPErrorinstead of throwing raw.createLCASteps— whenrequires_authenticationis set but no credentials could be obtained (client can't elicit or the user declines), the tool now returns a clear error instead of silently creating a login test case withcredentials: undefined. This mirrors the accessibility tool's behavior.warninstead.ElicitResult..describe()strings back within the tool-prompt budget.Testing
npm run build(lint + format + tests + tsc) — green (273 tests).createLCAStepstest that had codified the silent behavior to assert the new error, and added a backward-compat test (credentials passed as args withrequires_authenticationset).🤖 Generated with Claude Code