Repository navigation
Conversation
bherila
force-pushed
the
codex/propose-fix-for-ai-chat-security-vulnerability
branch
from
August 15, 2026 07:45
9abc9a6 to
069c386
Compare
📓 Changelog previewThis is what your commits will add to the generated ## [Unreleased]
### Fixed
- **ai-chat:** Enforce context seed permissions |
Owner
Author
|
The functional change was carried into upstream security-hardening PR gotempsh#676 and its merged replacement gotempsh#677. Upstream gotempsh#676 explicitly lists this fork PR in its source coverage. Fork main has now been fast-forwarded to upstream main at |
bherila
deleted the
codex/propose-fix-for-ai-chat-security-vulnerability
branch
October 11, 2026 19:12
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.
Motivation
ProjectsRead/ProjectsWritepermissions.deployments:read,otel:read) are enforced before seeding or replaying hidden system context to the AI backend.Description
fn required_permission(&self) -> Option<Permission>to theConversationContextProvidertrait so providers can declare a domain-specific read permission.Permission::DeploymentsReadfor theDeploymentChatProviderandPermission::OtelReadfor theAlertChatProviderso their seeded context cannot be accessed without the matching permission.ConversationService::authorize_context(...)to centrally enforce a provider'srequired_permissionand its existingauthorizehook before seeding or replaying context.authorize_contextfrom the HTTP handlers that create a conversation, fetch conversation history, and send a message so sensitive seeds are checked before being persisted, shown, or sent to the AI backend.StubProvidertest helper to coverrequired_permission.## [Unreleased]CHANGELOG.mdentry documenting the security fix.Testing
cargo check --lib -p temps-ai-chatwhich completed successfully.cargo test --lib -p temps-ai-chatand all tests in the crate passed (75 passed; 0 failed).git diff --checkreported no whitespace or diff errors.Codex Task