-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(copilot): always allow, credential masking #2947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR implements two key security and UX improvements for the copilot system: Credential Masking: Prevents credential IDs from being exposed in the UI and database by:
Always Allow for All Tools: Extended the "Always Allow" functionality to work with integration tools (not just client tools):
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UI as Copilot UI
participant Store as Copilot Store
participant API as Backend API
participant DB as Database
Note over Store: On chat start
Store->>API: POST /api/copilot/execute-copilot-server-tool<br/>(get_credentials)
API->>DB: Query user's credentials
DB-->>API: Return credentials list
API-->>Store: Return credentials with IDs
Store->>Store: Store credential IDs in sensitiveCredentialIds Set
Note over Store: Tool execution flow
Store->>Store: SSE handler receives tool_call
Store->>Store: Check autoAllowedTools list
alt Tool is auto-allowed
Store->>Store: Auto-execute tool (skip user confirmation)
else Tool requires confirmation
Store->>UI: Show Allow/Always Allow/Skip buttons
User->>UI: Clicks "Always Allow"
UI->>Store: addAutoAllowedTool(toolName)
Store->>API: POST /api/copilot/auto-allowed-tools
API->>DB: Add tool to auto-allowed list
DB-->>API: Success
API-->>Store: Return updated autoAllowedTools
Store->>Store: Find all pending tools of same type
loop For each pending tool
alt Integration tool
Store->>Store: executeIntegrationTool(toolCallId)
else Client tool with interrupt
Store->>Store: Call tool.handleAccept(params)
end
end
end
Note over UI: Credential masking
Store->>Store: serializeMessagesForDB(messages)
Store->>Store: maskCredentialIdsInValue(message, credentialIds)
Store->>Store: Replace credential IDs with "••••••••"
Store->>API: Save masked messages to DB
UI->>Store: Request message content
Store->>Store: maskCredentialValue(content)
Store-->>UI: Return masked content
UI->>UI: Render content with masked credentials
|
waleedlatif1
added a commit
that referenced
this pull request
Jan 22, 2026
…lution consolidation, helm updates (#2946) * improvement(workflow-item): stabilize avatar layout and fix name truncation (#2939) * improvement(workflow-item): stabilize avatar layout and fix name truncation * fix(avatars): revert overflow bg to hardcoded color for contrast * fix(executor): stop parallel execution when block errors (#2940) * improvement(helm): add per-deployment extraVolumes support (#2942) * fix(gmail): expose messageId field in read email block (#2943) * fix(resolver): consolidate reference resolution (#2941) * fix(resolver): consolidate code to resolve references * fix edge cases * use already formatted error * fix multi index * fix backwards compat reachability * handle backwards compatibility accurately * use shared constant correctly * feat(router): expose reasoning output in router v2 block (#2945) * fix(copilot): always allow, credential masking (#2947) * Fix always allow, credential validation * Credential masking * Autoload * fix(executor): handle condition dead-end branches in loops (#2944) --------- Co-authored-by: Vikhyath Mondreti <[email protected]> Co-authored-by: Siddharth Ganesan <[email protected]>
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
Fixes always allow, and masks credentials
Type of Change
Testing
Manual
Checklist