test(sandbox): reject malformed proxy hostnames#1562
Conversation
c36faac to
9ce9fde
Compare
9ce9fde to
eee1f72
Compare
| &self, | ||
| input: &NetworkInput, | ||
| ) -> Result<(NetworkAction, u64)> { | ||
| let generation = self.current_generation(); |
There was a problem hiding this comment.
Was this moved for a specific reason? This could return a generation that doesn't map to the engine snapshot actually used for policy eval if a policy reload happens between reload and a policy reload. Off chance but non-zero. Can we keep the malformed-host fast deny separate and move generation capture back under the engine lock?
|
@mjamiv one small question but otherwise looking good |
|
Addressed the generation-capture review note in bb0875b.\n\nWhat changed:\n- malformed-host fast deny stays before policy evaluation\n- policy-evaluated network actions now capture the generation after acquiring the OPA engine lock again, so the generation maps to the engine snapshot used for eval\n\nValidation passed:\n- cargo test -p openshell-sandbox malformed\n- cargo test -p openshell-sandbox --lib\n- cargo fmt --all -- --check\n- git diff --check |
PR Review StatusValidation: project-valid because this is a focused sandbox proxy/policy security regression fix linked to review-ready issue #1498. Review findings:
Docs: no Fern docs change required; this is fail-closed validation for malformed unsafe host input, and maintainer-authored issue #1498 records no docs impact expected for this internal regression/security coverage. Tests: Next state: /ok to test bb0875b |
|
Label |
/ok to test bb0875b |
|
/ok to test bb0875b |
Follow-Up NeededI cannot move this PR past pipeline watch yet because The PR only changes I will keep watching the PR after the update. |
Summary
Fixes #1498.
Testing