security: require exact bytes for request stream accounting - #80
security: require exact bytes for request stream accounting#80seonghobae wants to merge 5 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
@opencode-agent Complete only the bounded GREEN changelog/validation tail on exact current head The immutable test-only RED commit is Modify only After that single-file change, run the focused request-stream chunk regressions plus the complete repository test/100% production statement+branch coverage/public-docstring/Ruff/compile/package contract available on the branch. Report the resulting exact head and test evidence in this PR conversation. Do not modify tests, production code, docs, |
|
@opencode-agent Supersede the previous request because the branch head advanced by a test-only cleanup refinement. Complete only the bounded GREEN changelog/validation tail on exact current head The immutable RED remains Modify only After that single-file change, run the focused request-stream chunk regressions plus the complete repository test/100% production statement+branch coverage/public-docstring/Ruff/compile/package contract available on the branch. Report the resulting exact head and test evidence in this PR conversation. Do not modify tests, production code, docs, |
|
@opencode-agent Complete the bounded GREEN tail on exact current head Modify only After the one-file change, run the focused request-stream regressions and the complete repository contract: Python 3.10–3.13, Ruff, complete pytest, 100% production statement and branch coverage, public docstrings, compileall, package acceptance, SAST, and Security Scan. Keep the PR draft until the new exact head is green. Do not modify production code, tests, docs, |
|
@opencode-agent Complete only the remaining bounded changelog tail on exact current head The exact current PR diff still contains only Modify only After that single-file change, run the focused request-stream regressions and complete repository test/100% production statement+branch coverage/public-docstring/Ruff/compile/package contract. Report the resulting exact head and evidence here. Keep Draft; do not merge, mark Ready, auto-merge, rebase, retarget, publish, release, or change |
|
@opencode-agent Complete the already-declared bounded scope on exact PR head The implementation/tests/docs are present and exact-head CI/SAST/Security Scan are green, but the PR body explicitly requires a concise Do not touch production code, tests, research docs, |
|
Superseded by #85 on the identical branch and exact head |
Test-first request-resource hardening
Fixes #79 with a bounded non-workflow repair from exact protected-main base
10d0c51daf2ad278d66f43be479df8cf6b08ba6d.Exact tree and TDD evidence
10d0c51daf2ad278d66f43be479df8cf6b08ba6d.07de0d2dbb8b9e2587c4809d5f189c21840b4615adds synchronous/asynchronous regressions for lying and raisingbytessubclasses, arbitrary non-exact-byte chunks, hostile cleanup, and ordinary exact-byte acceptance. The pre-fix implementation usedisinstance(chunk, bytes)beforelen(chunk), so those subclass cases failed for the intended reason.be670b5a9d81a3de253727eaf6897c8f6e0d1525requirestype(chunk) is bytesbefore length accounting or downstream delivery on both request-stream paths.05d47777fa09a80a2314266ba22d4ba3270a3056records the runtime trust boundary and APA 7th references to RFC 9110, RFC 9112, CWE-400 v4.20, CWE-444 v4.20, and the HTTPX developer/transport interfaces.94e8c4578fd7f8b54faa4f3090f72666dee1a2ab; its final test-only refinement exhausts and explicitly closes the positive exact-byte fixtures without changing production behavior.Implemented boundary
bytesbefore invokinglen()or yielding a request chunk downstream;bytessubclasses,bytearray, and arbitrary malformed objects before resource accounting or HTTPCore delivery;EgressNotAllowedError("egress URL is not allowed")boundary;Content-Lengthequality, single-consumption semantics, early declared-length rejection, authority validation, HTTP framing checks, TLS identity, proxy isolation, and timeout behavior;[Unreleased]without a version bump.Exact-current-head verification
CI run
31130730734succeeded on exact head94e8c4578fd7f8b54faa4f3090f72666dee1a2ab:SAST Semgrep run
31130735048and Security Scan run31130735078also succeeded on the same exact head. The aggregate Security Scan is not accepted as complete dependency-review evidence until the organization-owned fail-closed exact-head repair inContextualWisdomLab/.github#799is integrated and this head is revalidated through that repaired gate.Scope and remaining gates
Changed paths are exactly:
src/egressweave/request_body_safety.pytests/test_request_stream_chunk_validation.pydocs/research/request-body-resource-limits.mdCHANGELOG.mdThis PR changes no
.githubpath, workflow, dependency, credential, permission, protected ref, release/package/tag/publication path, destination authority, TLS/proxy policy, or public API shape.Keep this PR Draft until the central dependency-review repair is integrated and exact-current-head security evidence is rerun. Then require completed current-head automated review, independent non-author approval, branch protection, and every repository policy gate. Missing, queued, skipped, stale-head, synthetic-merge, or fail-open evidence is not acceptance. Do not merge, auto-merge, release, publish, rebase, or retarget before those gates.