Repository navigation
fix: restrict CORS and guard scan endpoints by origin (#334) - #337
Open
rwinkelman wants to merge 5 commits into
Open
rwinkelman wants to merge 5 commits into
rwinkelman wants to merge 5 commits into
Conversation
Contributor
Author
|
Opened this since #334 still has no PR from @DevamShah — happy to close/rebase if they land first. |
Contributor
Author
|
Rebased onto current |
rwinkelman
force-pushed
the
fix/cors-origin-allowlist-334
branch
from
September 19, 2026 14:09
54519a1 to
7b9a699
Compare
Contributor
Author
|
Grooming pass 2026-09-28: rebased onto current |
Default to an empty allowlist, disable credentials, and block cross-origin browser POSTs to /stop, /scan, /verify, and /scan-csv unless explicitly allowed.
Use None as the settings_var default so lru_cache can key the call, and apply black-style wrapping CI expects.
rwinkelman
force-pushed
the
fix/cors-origin-allowlist-334
branch
from
September 28, 2026 10:02
7b9a699 to
f4728b2
Compare
This branch has not been deployed
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
allow_credentials=Falseinstead of wildcard*OriginGuardMiddlewareso cross-origin browser POSTs to/stop,/scan-csv,/verify, and/scanare rejected unless same-origin or explicitly allowlistedAGENTIC_SECURITY_CORS_ORIGINSor[server].cors_allow_originsinagentic_security.tomlCloses #334 (complements @DevamShah's branch — happy to close in favor of theirs if they open first).
Test plan