fix(status-server): stop sending ACAO:* on unauthenticated read responses - #3137
Merged
Conversation
…nses serve-status sent Access-Control-Allow-Origin: * on every JSON response, so any website the operator visits could read control-plane state and private repo Markdown while the server was running. Only loopback browser origins may read responses cross-origin now; foreign origins and non-browser clients receive no ACAO header. Write endpoints keep their existing is_loopback_origin checks. Addresses GHSA-vx2m-gpq4-8j5q and GHSA-p7c9-q3rc-f4f5.
huangruiteng
commented
Aug 12, 2026
huangruiteng
left a comment
Owner
Author
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
中文结论
精确评审头: 3137@2d3b5931b(codex/security-serve-status-cors)
serve-status 读接口不再发送 Access-Control-Allow-Origin: *,仅对 loopback Origin 回显;写接口原有 origin 校验保留。exact head 上 7 项新增 CORS 测试(含真实 HTTP 集成)+ 既有 extension-projection 测试全部通过,py_compile 干净。CI pytest 变红为 main 基线问题(干净 main 同样失败 9 个真实模型测试),与本 PR 无关。
结论:APPROVE(author-owned,GitHub 阻止正式 self-approve,以评论记录)。
English Verdict
APPROVE — exact head 2d3b5931b. serve-status read responses no longer send ACAO: *; loopback origins are echoed, foreign origins get no CORS header. 7 new tests plus existing extension-projection tests pass; CI pytest red is a confirmed baseline failure, unrelated to this change.
huangruiteng
added a commit
that referenced
this pull request
Aug 12, 2026
huangruiteng
added a commit
that referenced
this pull request
Aug 12, 2026
#3147) Mark the fresh-project onboarding fixture done (GH-C87, #3093/#3103), bump release docs slices to v0.4.5, and add security-boundary (GH-C90) plus obligation-bound replan/evidence-read (GH-C91) fixtures. Reflect merged security fixes #3137-#3140, PR-review lenses #3123/#3134, replan evidence-log hardening #3100-#3106/#3112/#3135/#3144, and the landed React homepage #3098.
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
loopx serve-statussentAccess-Control-Allow-Origin: *on every JSON response, including unauthenticated read routes. While the server is running, any website the operator visits couldfetch()control-plane state and private repo Markdown cross-origin without interaction.Change
cors_response_headers(origin): only loopback browser origins are echoed; foreign origins and non-browser clients (no Origin header) receive no ACAO header, so browsers block cross-origin reads._send_jsonanddo_OPTIONSnow use this helper instead of hardcoding*.is_loopback_originchecks.Validation
tests/test_status_server_cors.py: 7 new tests (unit: loopback echo, foreign reject, no-Origin; integration: /healthz without Origin, foreign Origin, loopback Origin) - all pass.tests/test_status_server_extension_projection.pypasses.py_compileclean.Addresses GHSA-vx2m-gpq4-8j5q and GHSA-p7c9-q3rc-f4f5 (details kept private pending coordinated disclosure).