fix(dav): reject ambiguous nested authorization encodings - #1345
fix(dav): reject ambiguous nested authorization encodings#1345seonghobae wants to merge 33 commits into
Conversation
📝 WalkthroughWalkthroughThe PR adds bounded DAV authorization-path normalization, restricts allowlisted local provider hostnames to approved private networks, and adds organization scoping to document queries. Tests and boundary documentation cover the updated behavior. ChangesDAV authorization path validation
Local provider network boundaries
Document organization authorization
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant DAVClient
participant DAVHandler
participant PathNormalizer
participant DAVAuthorization
participant PROPFINDHandler
DAVClient->>DAVHandler: send DAV request with authorization path
DAVHandler->>PathNormalizer: validate and normalize path
PathNormalizer-->>DAVHandler: normalized path or HTTP error
DAVHandler->>DAVAuthorization: authorize normalized path
DAVAuthorization-->>DAVHandler: authorization result
DAVHandler->>PROPFINDHandler: process normalized path
PROPFINDHandler-->>DAVClient: WebDAV response
Merge Risk: 🟡 Moderate · up to This PR tightens DAV authorization decoding, local-provider network restrictions, and organization-scoped document access. It is not merge-ready until qualifying fresh independent review and every live required check succeed on the unchanged current head; the remaining branch-coverage request is a non-blocking follow-up. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
PR governance metadata gate is not ready for
|
|
Current-head review disposition for the remaining DAV test comment: not a valid code/test defect on @coderabbitai review |
|
I have withdrawn that finding. I will run a fresh automated review of the current head. 🐇 ✏️ Learnings added
|
|
@coderabbitai review |
|
|
@coderabbitai review |
|
Superseded by later exact-head fixes. The DAV normalized-path finding is resolved and its review thread records it as addressed. This dismissal clears stale predecessor-head review state only; a fresh qualifying current-head independent approval remains required.
|
|
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headff6e47554a76992f8166d28aca5ffc12bd5e2088. -
Head SHA:
ff6e47554a76992f8166d28aca5ffc12bd5e2088 -
Workflow run: 32116669104
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Backend (7 files)"]
S1 --> I1["API and service runtime"]
I1 --> R1["Review risk: Backend (7 files)"]
R1 --> V1["backend tests"]
Evidence --> S2["Docs: dav-and-local-provider-network-boundaries.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: dav-and-local-provider-network-boundaries.md"]
R2 --> V2["docs review"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage evidence job did not run or did not publish coverage evidence. Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Backend (7 files)"]
S1 --> I1["API and service runtime"]
I1 --> R1["Review risk: Backend (7 files)"]
R1 --> V1["backend tests"]
Evidence --> S2["Docs: dav-and-local-provider-network-boundaries.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: dav-and-local-provider-network-boundaries.md"]
R2 --> V2["docs review"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head89d885084fec5510c53c8cab992bf1f41c6abd55. -
Head SHA:
89d885084fec5510c53c8cab992bf1f41c6abd55 -
Workflow run: 32420608708
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Backend (7 files)"]
S1 --> I1["API and service runtime"]
I1 --> R1["Review risk: Backend (7 files)"]
R1 --> V1["backend tests"]
Evidence --> S2["Docs: dav-and-local-provider-network-boundaries.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: dav-and-local-provider-network-boundaries.md"]
R2 --> V2["docs review"]
Verified: coverage-evidence and other non-metadata-gate required checks on the current head now report pass (gh pr checks). The coverage-evidence failure this review cited has since cleared on rerun. Dismissing as superseded.
|
Strix finding disposition (check-run 97109339574, model MEDIUM "Authentication Bypass via Session Verifier Override in AuthContext" — REBUTTED (false positive on unchanged trusted context). The report itself is conditional ("If there exists a code path where..."); no such path exists:
|
|
Fresh authority correction: the live protected base is |
Current authority — frozen predecessor
This Draft is not an active DAV source writer. Fresh succession audit on 2026-09-10 found that its valid concerns split into two later owner paths:
#1417@489bcbeaf131da123551a187228862b0e47ad549, including_document_organization_filter, current data action/quality-surface regressions, and real PostgreSQL coverage for legacyorganization_id IS NULLrows;a000037b8fb6433992bfe8c616d0932b3855ec58, stacked on fix(email): enforce shared send throttling #1417.The earlier exact head
9a019892f7d53f72415fa5633a0facd73815b8f4remains intact as predecessor evidence. Do not add source, tests, fixtures, docs, or restacks here while #1645 is the active DAV successor.Succession audit
Two #1345 invariants were found missing from pre-repair #1645 and therefore were not silently discarded:
#1645 captured those as RED
68ce68a952a9cbc027eeda8ff1117322e5209f4b/ isolated REDb2eb1fe85b714a49481bd26c06fe62573069e4b5, fixed them incff6e61d4c96ce077b21517e1c126baaaa607203, and recorded standards/succession evidence ina000037.... The successor now uses one canonical path for owner checks, logging, andPROPFINDrouting, capsraw_pathat 8192 octets, and bounds the decoded fallback when ASGI omitsraw_path.Other older #1345 choices are intentionally superseded rather than copied blindly.
DAV: 1is not emitted because the partial gateway does not yet satisfy RFC 4918 class-1 MUST requirements. Selected unsupported verbs may remain registered solely for explicit 501 responses; they are not advertised inAllow, which remainsOPTIONS, PROPFIND.Close boundary
Do not close this PR merely because a successor exists. Close is permitted only after #1645's current/final exact head has terminal required execution, all valid findings resolved, qualifying independent review, and a verified succession audit showing that every still-valid #1345 delta/test/fixture/contract/evidence is either preserved by #1645 or represented by its inherited #1417 ancestry. Until then this PR remains open/Draft/frozen as provenance.
Refs #1344.