Skip to content

draft(architecture): preserve outbound-policy RED pending EgressWeave release - #136

Draft
seonghobae wants to merge 19 commits into
mainfrom
codex/commercial-loop-20260831
Draft

draft(architecture): preserve outbound-policy RED pending EgressWeave release#136
seonghobae wants to merge 19 commits into
mainfrom
codex/commercial-loop-20260831

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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#237 now carries the fresh consumer evidence at comment 5540660961 and 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 is 28e5776388b2fc31e1d0567382871a1f599aa3ed.

The branch currently demonstrates these consumer/security requirements:

  • embedded credentials, fragments, localhost/trailing-dot aliases, non-loopback plaintext HTTP, and private/link-local/documentation/reserved literal destinations must fail closed;
  • hostname validation and the eventual connection must remain bound so DNS rebinding cannot replace an approved address with a denied one;
  • ambient proxies and automatic redirects must not silently widen authority;
  • resource state such as validated-address/client caches must remain finite;
  • safe first-hop proxy metadata must not reintroduce hop-by-hop or Connection-nominated fields;
  • phishing/TAXII/KEV style operations need one end-to-end budget in which owner-required DNS work consumes the same finite budget as subsequent HTTP I/O;
  • purpose-specific Wardnet call sites may own their own operation budget/purpose/evidence fields, but not DNS/address/HTTP authorization semantics.

DNS deadline RED → local GREEN lineage

The review finding was valid: manual lookup_host originally ran before the request-builder timeout, so a stalled resolver could exceed the intended feed/TAXII/KEV operation budget.

  • RED f408500d8aeb4beb386caa48a7525508d59da193 requires one shared deadline across DNS validation and remaining HTTP work.
  • Prerequisite 83e2b4fdfae6eb927dd1b6ce5a263af654c52540 enabled Tokio time support.
  • Runnable RED 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19 produced terminal CI failure 33698726857 at phishing_feed_dns_resolution_shares_the_end_to_end_operation_deadline.
  • Local production repair was present by 9978f8c643433b5df0398e3d9f3608546fdadecd.
  • Current 28e5776388b2fc31e1d0567382871a1f599aa3ed adds 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, Fuzz 33842763449, Security Scan 33842763513, and SAST Semgrep 33842763530. CI job 100928237991 was pre-checkout with steps=[], runner_id=0, and no runner/group identity. .github#712 comment 5536431288 owns 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 18156473 also retains the structurally impossible solo-maintainer generic one-approval count; .github#772 owns 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:

  • EgressWeave has an immutable compatible release/versioned Rust-consumer boundary with exact source/artifact identity, SBOM/provenance/reproducibility and hostile conformance evidence;
  • Wardnet has removed its local destination/DNS/redirect/proxy/TLS/resource policy authority and consumes only the released EgressWeave port/ACL;
  • Wardnet-owned purpose, call-site, deadline/evidence correlation and failure semantics are preserved without copying EgressWeave internals;
  • unsupported/unavailable/unverifiable owner contracts fail closed;
  • all valid review findings/threads are zero and candidate-base compatibility is fresh;
  • every then-live repository/security/coverage/package/SBOM/provenance/review/governance gate is terminal-valid on one unchanged exact head.

No self-approval, model-as-human approval, force push, routine bypass, predecessor-evidence reuse, or mutable foreign-owner dependency.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 964379b8-9b0a-4c29-ba2c-7e7a8907e785

📥 Commits

Reviewing files that changed from the base of the PR and between b07d0d7 and 3e66c26.

📒 Files selected for processing (1)
  • tests/outbound_policy_architecture.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

공통 아웃바운드 URL 검증에 DNS 해석 검증과 주소 고정을 추가했습니다. Clearfolio, SOC LLM, TAXII, KEV, feed 및 proxy 경로가 검증된 클라이언트를 사용합니다. 관련 테스트와 운영·보안 문서를 갱신했습니다.

Changes

아웃바운드 목적지 정책

Layer / File(s) Summary
공통 목적지 정책 구현
src/lib.rs
PinnedOutboundClientCache가 요청 시점 DNS 결과를 검증하고 주소를 고정합니다. 주소 집합이 일치할 때만 클라이언트를 재사용하고, 용량 초과 시 LRU 방식으로 퇴거합니다. 리디렉션과 ambient proxy 사용을 차단합니다. 예약 IPv4 대역을 거부합니다.
외부 호출 및 프록시 적용
src/lib.rs
Clearfolio, SOC LLM, TAXII, KEV, feed 및 proxy 요청에 검증된 URL과 고정 클라이언트를 적용했습니다. route upstream과 최종 proxy target을 검증합니다. proxy 응답에서 hop-by-hop 헤더를 제거합니다.
정책 검증과 운영 문서
src/lib.rs, tests/outbound_policy_architecture.rs, docs/runbooks/operations.md, docs/security/threat-model.md
DNS 해석 결과 고정, 후행 점 호스트, 예약 IPv4, 사설 목적지, 리디렉션, 캐시 퇴거 및 proxy 헤더 처리를 검증합니다. 아키텍처 테스트가 공유 클라이언트 사용과 outbound 표면의 정책 적용을 검사합니다. DNS-aware allowlist, 요청 시점 egress 재검증 및 DNS pinning 요구사항을 문서화했습니다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: ⚪ Minimal · up to 3e66c

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 헤더 제거 후 응답 전달
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning 현재 구현된 HTTP 표면의 대상 검증, DNS 주소 집합 검증, 연결 고정, 리다이렉트·프록시 차단, 아키텍처 테스트는 [#79]의 일부 요구사항을 충족합니다. 그러나 모든 아웃바운드 요청의 적용, 명시적 버전 관리 allowlist와 deny precedence, 결정 증거, 운영 문서, 전체 저장소·보안·커버리지 게이트는 아직 완료되지 않았습니다. [ #79 ]의 남은 요구사항을 구현하고 검증하십시오. 모든 Wardnet 소유 아웃바운드 표면을 공유 정책으로 중재하고, hostname/suffix·IP/CIDR·scheme·port에 대한 명시적 버전 관리 allowlist와 deny-overrides precedence를 추가하십시오. 구성 시점과 요청 시점 검증을 일치시키고, 민감 정보를 제외한 최소 정책 결정 증거를 기록하십시오. allowlist 마이그레이션·긴급…
Docstring Coverage ⚠️ Warning Docstring coverage is 70.59% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 변경 사항은 [#79]의 아웃바운드 fail-closed 정책, DNS rebinding 방어, 프록시·리다이렉트 차단, 아키텍처 회귀 테스트 및 보안 문서화와 직접 관련됩니다. 제공된 변경 요약에서 무관한 코드나 문서 변경은 확인되지 않습니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 outbound-policy 아키텍처 변경과 PR의 부분 진행 상태를 언급하므로 변경 사항과 관련됩니다. 그러나 주요 구현 내용인 fail-closed outbound HTTP 검증 경계와 대상 요청 표면을 직접 설명하지 않아 부분적으로만 명확합니다.
Full details: Linked Issues check

Resolution

[ #79 ]의 남은 요구사항을 구현하고 검증하십시오. 모든 Wardnet 소유 아웃바운드 표면을 공유 정책으로 중재하고, hostname/suffix·IP/CIDR·scheme·port에 대한 명시적 버전 관리 allowlist와 deny-overrides precedence를 추가하십시오. 구성 시점과 요청 시점 검증을 일치시키고, 민감 정보를 제외한 최소 정책 결정 증거를 기록하십시오. allowlist 마이그레이션·긴급 롤백·오탐 진단 문서를 추가하고, 요구된 통합 테스트와 저장소·보안·커버리지 게이트를 통과한 뒤에만 이슈를 완료 처리하십시오.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/commercial-loop-20260831

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume
@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 55 minutes.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

@seonghobae Resumed automatic reviews and requested a full review for #136.

⚠️ Action not completed

Reviews resumed.


Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 53 minutes.

Copy link
Copy Markdown
Contributor Author

@coderabbitai autofix

Apply only the still-valid unresolved current-head finding on 3e66c260bfcd09c7dc98dc5d1e931583f8379093: DNS resolution in validated_outbound_http_client currently runs before the feed/TAXII/KEV 15-second request timeout, so a stalled resolver can outlive the intended end-to-end operation budget. Preserve the shared fail-closed destination policy, pinned-resolution/DNS-rebinding protection, redirect/proxy disablement, and existing caller semantics. Add a deterministic hostile/stalled-resolution regression first, implement the smallest causal shared-deadline fix, and run the relevant Rust tests/format/clippy. Do not alter unrelated review findings or weaken any gate.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Autofix skipped. No unresolved review comments with fix instructions found.

Copy link
Copy Markdown
Contributor Author

@coderabbitai Please implement this exact current-head repair and commit it directly to the current PR branch (do not open a stacked PR): on 3e66c260bfcd09c7dc98dc5d1e931583f8379093, the manual lookup_host in validated_outbound_http_client executes before the 15-second timeout in fetch_text_feed, fetch_taxii_objects, and fetch_kev_catalog. Make that 15-second budget truly end-to-end so stalled DNS resolution cannot outlive it. Prefer the smallest causal design (for example, an outer Tokio timeout/deadline around each complete fetch operation, or a shared absolute deadline propagated through resolution and request I/O). Add a deterministic regression that would hang/fail without the deadline and terminates fail-closed with it. Preserve DNS pinning, private-address rejection, no redirects, no ambient proxy, existing response-size limits, and unrelated caller semantics. Run rustfmt plus focused/full Rust tests and strict clippy as available. Do not change unrelated behavior or weaken checks.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

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
done

Length 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.rs

Length 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.rs

Length 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 warnings

Length 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 warnings

Length of output: 89053


@seonghobae The second validation attempt is also inconclusive.

Two sandbox environment failures block verification:

  1. cargo fmt --check still cannot find the fmt subcommand, even though rustfmt is installed.
  2. Rust compilation fails while building ring v0.17.14. The sandbox lacks usable C standard-library headers, including stdint.h and assert.h.

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.

Copy link
Copy Markdown
Contributor Author

@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: validated_outbound_http_client(...) performs lookup_host((host, port)).await before the caller's reqwest timeout is applied. For the feed/TAXII/KEV paths this lets DNS delay exceed the intended end-to-end operation budget.

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 cargo fmt --check and the focused/full locked Rust suites available in the branch, update the exact-head PR evidence, and resolve the existing review thread only if the current code genuinely closes it. No force-push, no rebase, and no predecessor check transfer.

@devin-ai-integration

Copy link
Copy Markdown

Failed to start a Devin session. Please try again.

Copy link
Copy Markdown
Contributor Author

@jules Implement the still-valid DNS-deadline repair on this PR's current exact head 83e2b4fdfae6eb927dd1b6ce5a263af654c52540 only. Re-read the branch before writing; if the head moved, adopt the intervening delta and do not force-push or destructively rebase.

Current RED is already present in tests/outbound_policy_architecture.rs: feed/TAXII/KEV operations must share one end-to-end deadline across Wardnet's manual lookup_host validation and the subsequent reqwest request. src/lib.rs still runs lookup_host before the 15-second request-builder timeout, so a stalled resolver can exceed PHISHING_DATABASE_FETCH_TIMEOUT_SECS.

Use the smallest causal design. Preferred shape: establish one absolute tokio::time::Instant before resolution in each of fetch_taxii_objects, fetch_text_feed, and fetch_kev_catalog; pass it into validated_outbound_http_client; wrap hostname resolution with tokio::time::timeout_at; after validation, give reqwest only the remaining duration. Preserve literal/localhost behavior, pinned validated DNS addresses, TLS hostname/SNI semantics, private/reserved-address rejection, no redirects, no ambient proxy, response-size bounds, and all non-feed callers. Add a deterministic runtime regression that proves an exhausted/expired deadline fails closed before unbounded DNS I/O; do not depend on public DNS timing.

Run focused tests first, then cargo fmt --check, cargo test --locked --workspace, and strict workspace clippy. Do not resolve the existing deadline review thread or claim GREEN until the exact resulting head actually passes executable evidence. Do not change #155/auth scope, CGC/EA source, or unrelated review findings.

@seonghobae
seonghobae marked this pull request as draft September 2, 2026 23:17

Copy link
Copy Markdown
Contributor Author

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 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19 therefore must not become protected truth as a second semantic destination/DNS/redirect/proxy/TLS/resource-policy implementation.

Owner handoff is now actionable as ContextualWisdomLab/EgressWeave#237. It carries the exact Wardnet head/base, the unresolved end-to-end DNS deadline RED, and GREEN acceptance for an immutable Rust-compatible versioned egress authorization boundary with release/SBOM/provenance and hostile conformance vectors.

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.

seonghobae commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@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 ContextualWisdomLab/EgressWeave#237 already owns the exact DNS-deadline RED plus the immutable Rust-compatible owner-contract acceptance. The prior wording asking for a local production repair would duplicate that semantic owner and is withdrawn.

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.

Copy link
Copy Markdown
Contributor Author

Current-head causal repair note for 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19: the existing RED in tests/outbound_policy_architecture.rs is still valid. validated_outbound_http_client awaits lookup_host((host, port)) before any request-builder timeout exists, so DNS can escape the feed/TAXII/KEV operation budget.

Keep this Network-Egress slice narrow. Minimal GREEN shape:

  • establish one tokio::time::Instant deadline in each of fetch_taxii_objects, fetch_text_feed, and fetch_kev_catalog before request-time DNS validation;
  • pass that exact deadline into validated_outbound_http_client and fail closed with tokio::time::timeout_at(deadline, lookup_host(...)) rather than an independent resolver timeout;
  • after DNS/pinned-client creation, set the request timeout from only deadline.saturating_duration_since(tokio::time::Instant::now()); if the budget is exhausted, fail before .send();
  • add a deterministic runtime regression around the resolver/deadline seam using a pending resolver future (or an equivalently narrow injectable resolver helper), proving a stalled resolution terminates at the same operation deadline without relying on external DNS behavior;
  • preserve no-proxy/no-redirect, validated-address pinning, TLS hostname identity, cache bounds, body-size streaming limits, and the existing Wardnet/EgressWeave ownership boundary.

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 .github#712, not a reason to churn this branch.

Copy link
Copy Markdown
Contributor Author

@devin Re-read and repair this existing Draft on exact current head 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19; if the head moved, adopt the intervening delta and do not force-push or destructively rebase. The current executable RED is tests/outbound_policy_architecture.rs::phishing_feed_dns_resolution_shares_the_end_to_end_operation_deadline: validated_outbound_http_client awaits lookup_host((host, port)) before the caller's PHISHING_DATABASE_FETCH_TIMEOUT_SECS request timeout, so stalled DNS can escape the intended TAXII/text-feed/KEV end-to-end budget. Keep the Network-Egress slice narrow and do not duplicate EgressWeave semantics beyond Wardnet's represented consumer boundary. Establish one absolute tokio::time::Instant before request-time DNS validation in each of fetch_taxii_objects, fetch_text_feed, and fetch_kev_catalog; propagate that same deadline through validated_outbound_http_client; fail closed with tokio::time::timeout_at(deadline, lookup_host(...)); then give reqwest only deadline.saturating_duration_since(Instant::now()), failing before .send() if exhausted. Add a deterministic runtime hostile test around the resolver/deadline seam using a pending/injectable resolver future or equivalent hermetic mechanism—no public DNS timing. Preserve DNS pinning, TLS hostname identity/SNI, private/reserved-address rejection, no-proxy/no-redirect, bounded pinned-client cache, streaming body-size caps, and all non-feed caller semantics. Run the focused RED/new runtime test, cargo fmt --check, cargo test --locked --workspace, and strict workspace clippy where available. Commit only the minimal causal repair to the current PR branch; do not resolve findings or claim GREEN until the resulting exact head has executable evidence.

@devin-ai-integration

Copy link
Copy Markdown

Failed to start a Devin session. Please try again.

Copy link
Copy Markdown
Contributor Author

@jules Re-read exact current Draft head 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19 and implement only the verified DNS-deadline causal repair already specified by the current branch RED. If the branch moved, adopt the intervening delta; no force-push/destructive rebase. One absolute tokio::time::Instant must cover manual lookup_host plus the subsequent reqwest request for TAXII/text-feed/KEV, with timeout_at on resolution and only the remaining budget passed to reqwest. Add a hermetic runtime stalled-resolver regression; preserve DNS pinning/TLS hostname identity, SSRF/private-address rejection, no-proxy/no-redirect, cache and body bounds, and non-feed behavior. Keep Wardnet's boundary thin and do not duplicate EgressWeave policy semantics beyond this represented consumer-path timeout invariant. Run focused RED/GREEN, rustfmt, locked workspace tests, and strict clippy; commit only to this existing PR branch and do not claim GREEN without exact-head executable evidence.

Copy link
Copy Markdown
Contributor Author

Fresh adoption of concurrent non-force advance, 2026-09-04 KST: current head is now 9978f8c643433b5df0398e3d9f3608546fdadecd, exactly one commit ahead of the previously verified RED head 3cb1047416c3aa7fa8eb352b842cc55ad8c21b19; protected base remains main@cc15cc2c34daf8c104eeb83d52a6a66f3cd6e128. The intervening commit fix(security): bound outbound DNS by fetch deadline is causal and is adopted rather than overwritten: feed/TAXII/KEV now create one absolute Tokio deadline before destination validation, manual lookup_host is bounded with timeout_at, and reqwest receives only the remaining operation budget; Clearfolio/SOC/proxy retain explicit independent timeout semantics via None rather than inheriting the feed constant.

Every predecessor check conclusion is now non-transferable. Fresh exact-head CI 33839486137, Fuzz 33839486204, Security Scan 33839486145, SAST 33839486178, Scorecard 33839486114, and OSV 33839486437 have materialized but are queued, so the former architecture RED is not yet exact-head GREEN.

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.

@seonghobae seonghobae changed the title feat(security): fail closed on outbound literal destinations draft(architecture): preserve outbound-policy RED pending EgressWeave release Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation priority: high High-priority or P1 work status: needs-review Open pull request requiring current-head review or checks type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants