draft(architecture): preserve outbound-policy RED pending EgressWeave release - #136
draft(architecture): preserve outbound-policy RED pending EgressWeave release#136seonghobae wants to merge 19 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough공통 아웃바운드 URL 검증에 DNS 해석 검증과 주소 고정을 추가했습니다. Clearfolio, SOC LLM, TAXII, KEV, feed 및 proxy 경로가 검증된 클라이언트를 사용합니다. 관련 테스트와 운영·보안 문서를 갱신했습니다. Changes아웃바운드 목적지 정책
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: ⚪ Minimal · up to The PR centralizes outbound destination validation and fail-closed request behavior across the represented integrations. No actionable merge-blocking risk remains for this change after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Caller as 외부 호출 경로
participant Validator as outbound URL 검증기
participant DNS as DNS 해석기
participant Client as 고정 HTTP 클라이언트
participant Proxy as 프록시
Caller->>Validator: URL 검증 요청
Validator->>DNS: 요청 시점 호스트명 해석
DNS-->>Validator: 해석된 주소 반환
alt 정책 허용
Validator->>Client: 검증된 주소 고정
Client-->>Caller: 고정 클라이언트 반환
Caller->>Client: 리디렉션 없이 요청
else 정책 거부
Validator-->>Caller: 검증 오류 반환
end
Proxy->>Validator: 최종 upstream target 검증
Proxy->>Client: 고정 주소로 요청
Client-->>Proxy: upstream 응답 반환
Proxy-->>Caller: hop-by-hop 헤더 제거 후 응답 전달
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkResolution [
✨ Finishing Touches 💡 1📝 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
|
@coderabbitai resume |
|
|
|
|
@coderabbitai autofix Apply only the still-valid unresolved current-head finding on |
|
Autofix skipped. No unresolved review comments with fix instructions found. |
|
@coderabbitai Please implement this exact current-head repair and commit it directly to the current PR branch (do not open a stacked PR): on |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Current commit =='
git rev-parse HEAD
printf '%s\n' '== Candidate files =='
fd -t f '^(lib\.rs|Cargo\.toml|outbound_policy_architecture\.rs)$' .
printf '%s\n' '== src/lib.rs outline =='
ast-grep outline src/lib.rs --items all --type function --match 'validated_outbound_http_client|fetch_text_feed|fetch_taxii_objects|fetch_kev_catalog|lookup_host|resolve'
printf '%s\n' '== Relevant symbols and timeout uses =='
rg -n -C 8 -e '\bvalidated_outbound_http_client\b' -e '\bfetch_text_feed\b' -e '\bfetch_taxii_objects\b' -e '\bfetch_kev_catalog\b' -e '\blookup_host\b' -e 'timeout\(' src tests Cargo.toml 2>/dev/null || true
printf '%s\n' '== Test outlines =='
for file in $(fd -t f -e rs . tests); do
ast-grep outline "$file" --items all --type function --match 'test|feed|taxii|kev|outbound|resolve' 2>/dev/null || true
doneLength of output: 22868 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Imports, timeout constants, and client helpers =='
sed -n '1,90p;2500,2615p' src/lib.rs
rg -n -C 4 'PHISHING_DATABASE_FETCH_TIMEOUT_SECS|PinnedOutboundClientCache|pinned_outbound_http_client|outbound_http_client_builder' src/lib.rs
printf '%s\n' '== TAXII fetch =='
sed -n '1780,1885p' src/lib.rs
printf '%s\n' '== KEV fetch =='
sed -n '2390,2485p' src/lib.rs
printf '%s\n' '== Text-feed fetch =='
sed -n '3248,3345p' src/lib.rs
printf '%s\n' '== Unit-test module and related tests =='
rg -n -C 10 -e '^\s*mod tests\b' -e 'outbound_url_resolution_rejects_hostnames_that_resolve_to_loopback' -e 'validated_outbound_http_client_pins_prevalidated_hostname_addresses' -e 'fetch_text_feed\(' -e 'fetch_taxii_objects\(' -e 'fetch_kev_catalog\(' src/lib.rsLength of output: 33727 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '== Root dependency configuration =='
sed -n '1,240p' Cargo.toml
printf '%s\n' '== Unit-test imports and utilities =='
sed -n '3827,3925p' src/lib.rs
printf '%s\n' '== Existing timeout, paused-time, and pending-future tests =='
rg -n -C 8 -e 'tokio::time::timeout' -e 'start_paused' -e 'pause\(' -e 'advance\(' -e 'pending\(' -e 'Duration::from_millis' -e 'elapsed\(' src tests
printf '%s\n' '== Existing fetch tests around outbound policy =='
sed -n '7000,7320p' src/lib.rsLength of output: 5319 🏁 Script executed: #!/bin/bash
set -euo pipefail
cargo fmt --check
cargo test --lib outbound_fetch
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warningsLength of output: 1108 🏁 Script executed: rustup component add rustfmt clippy
cargo fmt --check
cargo test --lib outbound_fetch
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warningsLength of output: 89053
Two sandbox environment failures block verification:
The focused test, workspace test suite, and Clippy checks are not verified. Run the commands in a Rust environment with a working Cargo Rustfmt integration and C development headers installed. You are interacting with an AI system. |
|
@devin Please repair the verified unresolved DNS-resolution deadline defect on this existing branch, preserving the current exact source boundary and without widening Wardnet into EgressWeave ownership. Current causal boundary: Use TDD on the current branch. RED must deterministically prove that a resolver which does not complete before the operation deadline fails within the shared operation budget rather than waiting indefinitely or receiving a fresh full request timeout afterward. GREEN should establish one deadline before resolution and carry the remaining budget through DNS and the HTTP request; do not merely add an independent DNS timeout that can be followed by another full request timeout. Preserve DNS pinning, no-proxy/no-redirect behavior, loopback test allowances, bounded client cache, existing SSRF policy, and current error minimization. If Tokio time support is required, add only the necessary feature. Do not weaken or delete existing tests/gates. After the fix, run |
|
Failed to start a Devin session. Please try again. |
|
@jules Implement the still-valid DNS-deadline repair on this PR's current exact head Current RED is already present in Use the smallest causal design. Preferred shape: establish one absolute Run focused tests first, then |
|
Fresh bounded-context revalidation changes this Draft's integration role without discarding its valid security evidence. EgressWeave is the canonical outbound-HTTP policy owner under the current CWL contract, while Wardnet owns gateway/SOC/admission evidence. The current #136 head Owner handoff is now actionable as Preserve #136 and its RED/security fixtures rather than closing it: they are consumer acceptance evidence. Keep it Draft. After an immutable EgressWeave owner contract exists, adapt this branch non-destructively so Wardnet retains only a thin versioned ACL/port, fail-closed availability/version handling, SOC/admission evidence projection, and Wardnet-owned integration tests. Do not source-copy EgressWeave, pin a transient owner PR head, or carry the local semantic policy into protected Wardnet truth. The known DNS-deadline finding remains valid as owner-contract acceptance evidence; it is not a reason to implement a second policy engine here. |
|
@jules Superseding instruction after re-reading the current bounded-context decision: do not implement the DNS deadline policy locally in Wardnet #136. EgressWeave is the canonical outbound-HTTP policy owner, and Keep #136 Draft and preserve its current RED/security fixtures as Wardnet consumer acceptance evidence. Do not source-copy EgressWeave, pin a mutable EgressWeave PR head, or add a second destination/DNS/redirect/proxy/TLS policy engine here. After EgressWeave publishes an immutable released contract with the required deadline/SSRF behavior, adapt #136 non-destructively so Wardnet keeps only the thin versioned ACL/port, fail-closed unavailable/incompatible-version handling, SOC/admission evidence projection, and Wardnet-owned hostile integration tests. Re-read the exact branch before any future edit and preserve intervening delta. |
|
Current-head causal repair note for Keep this Network-Egress slice narrow. Minimal GREEN shape:
Do not widen this repair into Clearfolio/SOC/proxy timeout policy or duplicate EgressWeave. After the source repair, rerun the architecture RED plus the new stalled-resolution runtime test, then full exact-head CI/security/coverage. #155 remains the protected-main auth prerequisite for final integration; central queued/startup failures remain |
|
@devin Re-read and repair this existing Draft on exact current head |
|
Failed to start a Devin session. Please try again. |
|
@jules Re-read exact current Draft head |
|
Fresh adoption of concurrent non-force advance, 2026-09-04 KST: current head is now Every predecessor check conclusion is now non-transferable. Fresh exact-head CI The DNS-timeout review thread remains unresolved intentionally after source revalidation. Production deadline propagation is repaired, and the new already-expired-deadline unit regression exercises fail-closed DNS timeout without external latency, but it does not yet implement the previously recorded deterministic pending/delayed resolver seam proving a resolver that starts within budget cannot outlive the same absolute operation deadline. Resolve the thread only after that hostile runtime case exists and the unchanged exact head has terminal runtime + architecture GREEN. CodeRabbit's fresh pre-merge surface also reports touched-function docstring coverage below policy; do not represent this candidate as documentation-complete until the repository's Wardnet 100% owned-production rustdoc/docstring contract is satisfied or the touched items are demonstrated to be outside that production/public contract. No merge/restack/bypass is justified while #155 is not protected truth, current exact-head gates are queued, the DNS hostile-case acceptance remains incomplete, and central OpenCode/solo-governance owner repairs remain unresolved. |
Architecture gate — canonical-owner repair
This Draft must not integrate its current local outbound-policy implementation. Wardnet owns gateway/SOC admission and security evidence; EgressWeave is the canonical owner of outbound HTTP destination/address policy, DNS-rebinding resistance, redirect/proxy/TLS/resource enforcement and the corresponding reusable decision boundary. Implementing those semantics directly in Wardnet—even without source-copying EgressWeave—is still a second policy authority and violates the current CWL single-owner boundary.
The branch remains valuable as hostile consumer evidence. Preserve its exact SSRF/DNS-rebinding, pinned-address, proxy/redirect, cancellation and end-to-end DNS+HTTP deadline regressions so they can become conformance/ACL tests. Do not promote the local policy/client implementation to protected-main truth. Canonical owner issue
ContextualWisdomLab/EgressWeave#237now carries the fresh consumer evidence at comment5540660961and must publish an immutable Rust-consumable provider-neutral authorization/evidence boundary before this Wardnet lane is reconstructed.Once a compatible immutable EgressWeave release exists, non-destructively rebuild this branch against fresh protected Wardnet
main: retain Wardnet-owned call-site/purpose/evidence semantics and hostile consumer tests, replace semantic egress policy with a thin released EgressWeave port/ACL, fail closed on unsupported/unavailable/unverifiable owner evidence, and reacquire every exact-head gate. No mutable EgressWeave source/PR head, sibling checkout, cross-service SQL, or copied policy implementation is acceptable.Preserved consumer evidence
Protected Wardnet base remains
main@cc15cc2c34daf8c104eeb83d52a6a66f3cd6e128. Exact current head is28e5776388b2fc31e1d0567382871a1f599aa3ed.The branch currently demonstrates these consumer/security requirements:
Connection-nominated fields;DNS deadline RED → local GREEN lineage
The review finding was valid: manual
lookup_hostoriginally ran before the request-builder timeout, so a stalled resolver could exceed the intended feed/TAXII/KEV operation budget.f408500d8aeb4beb386caa48a7525508d59da193requires one shared deadline across DNS validation and remaining HTTP work.83e2b4fdfae6eb927dd1b6ce5a263af654c52540enabled Tokio time support.3cb1047416c3aa7fa8eb352b842cc55ad8c21b19produced terminal CI failure33698726857atphishing_feed_dns_resolution_shares_the_end_to_end_operation_deadline.9978f8c643433b5df0398e3d9f3608546fdadecd.28e5776388b2fc31e1d0567382871a1f599aa3edadds deterministic pending-resolver acceptance.That lineage proves the consumer requirement. It no longer authorizes the local production implementation as the architectural GREEN; owner GREEN is a released EgressWeave contract that satisfies the same timing and hostile conformance requirements.
Exact current execution
Current-head repository workflows remain non-passing/queued at the last exact read: CI
33842763514, Fuzz33842763449, Security Scan33842763513, and SAST Semgrep33842763530. CI job100928237991was pre-checkout withsteps=[],runner_id=0, and no runner/group identity..github#712comment5536431288owns that historical exact-head control-plane evidence; refetch before any future claim and do not churn this substantive head merely to manufacture dispatches.The previous DNS review finding/thread remains part of the preserved evidence history, but even terminal GREEN checks cannot make this current semantic implementation mergeable under the owner boundary.
Other integration dependencies
Wardnet replacement PR #155 owns the separate unauthenticated-management-write defect and must become protected truth independently. Live organization ruleset
18156473also retains the structurally impossible solo-maintainer generic one-approval count;.github#772owns that governance repair. Neither dependency justifies self/model approval, routine administrator bypass, gate weakening, or source churn.Reconstruction acceptance
Keep Draft until all of the following are true:
No self-approval, model-as-human approval, force push, routine bypass, predecessor-evidence reuse, or mutable foreign-owner dependency.