fix(security): harden chat and content boundaries - #6097
Draft
bokelley wants to merge 3 commits into
Draft
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
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
Why
Security review found cross-user session access, fail-open or incorrectly verified webhook paths, mutable system-prompt injection, unsafe external URL sinks, unbounded model/context inputs, and inconsistent organization-role enforcement. Several alternate write paths and legacy stored values bypassed the first-pass controls.
Impact
Unauthorized session reads and writes now return the same not-found response, anonymous continuation uses signed HttpOnly capabilities, member-controlled values cannot become system instructions or executable links, and external fetches are bounded and SSRF-defended. The SI prompt column remains present but constrained to
NULLfor rolling-deploy compatibility; it can be dropped in a later migration after old instances are fully retired.Validation
tsc --project server/tsconfig.json --noEmitgit diff --check: passedThe standalone Codex Security scan completed discovery, validation, and attack-path analysis but its CLI exporter failed on inconsistent internal evidence IDs. Its one high-severity finding in this PR's SI surface (inline-script JSON breakout) was fixed and independently re-reviewed; broader repository findings are queued for the next security wave.