Skip to content

security(evidence): bound versioned authority schema - #208

Draft
seonghobae wants to merge 8 commits into
mainfrom
security/bound-decision-evidence-authority-schema-main
Draft

security(evidence): bound versioned authority schema#208
seonghobae wants to merge 8 commits into
mainfrom
security/bound-decision-evidence-authority-schema-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Tighten the public decision-evidence JSON Schema so externally supplied evidence cannot be schema-valid while carrying authority material that EgressWeave runtime can never emit. The contract rejects URL syntax, credentials, paths, IP literals, legacy numeric-IP spellings, non-canonical hostnames, and invalid TCP ports while preserving the exact lowercase IDNA/ASCII hostname-plus-port shape emitted by runtime evidence.

This is a provider-neutral interoperability/privacy and data-integrity boundary for SIEM/GRC/naruon/MSA consumers. It does not change outbound request authorization, DNS resolution, TLS identity, transport behavior, credentials, persistence, logging, or release authority.

Exact identity and immutable TDD lineage

  • protected/live base: 7faf7a3b8a47980113982914000e724ab6a6cda5;
  • original broad-schema RED head: 31dd5459e641482ef356946222eff0aded622b21;
  • prior documented GREEN head: 88a13f42383cfdb470926ffeb6770c467b12e498;
  • dotted-hexadecimal test-only RED head: 6a76112ec4baa1aa3b53c867601225d902a17b3b;
  • schema repair head: 29bf77cca9f8248844b35b103d1f400f8729582c;
  • packaged-schema parity alignment head: b9a263bf78e17e4be44cf650651bd94cf4133b2c;
  • exact current final head: b44d414234e36966960730b2767e439b2b771dc0;
  • state: open / Draft / mergeable;
  • current delta: docs/decision-evidence.md, the packaged v1 schema, and two focused schema contract test modules.

Newly repaired parity defect

Runtime _looks_like_ip_literal(...) removes dots and rejects every normalized hostname whose compact form starts with 0x. The prior public schema rejected only an undotted 0x[0-9a-f]+ authority. Dotted legacy spellings such as 0x7f.0.0.1:443 and 0.x7f:443 could therefore remain schema-valid even though runtime evidence can never emit them.

The new immutable RED head 6a76112e... changed tests only. Hosted CI run 31878046079 reproduced the defect across Python 3.10–3.14. The Python 3.14.7 lane reported exactly 1 failed, 1027 passed; the failing assertion showed that 0x7f.0.0.1:443 matched the prior pattern.

The narrow repair:

  1. rejects the same compact-0x hostname class as runtime, including dotted variants;
  2. preserves lowercase DNS-label syntax, the 253-byte hostname ceiling, TCP ports 1..65535, and every existing URL/path/credential/IP-literal rejection;
  3. updates the independent packaged-schema parity contract rather than weakening it;
  4. documents legacy numeric and dotted hexadecimal rejection for downstream consumers; and
  5. changes no request-time authorization or runtime dependency.

Exact-current-head verification

On unchanged final head b44d414234e36966960730b2767e439b2b771dc0:

  • repository CI run 31878368823: completed success;
  • wheel and source-distribution build, archive verification, checksums, and installed-wheel smoke test: success;
  • Python 3.10, 3.11, 3.12, 3.13, and 3.14 lanes: success;
  • Python 3.14.7: 1028 passed;
  • exact owned-production coverage: 1758/1758 statements and 588/588 branches, zero misses or partials, 100%;
  • Ruff, hourly product-guard self-test, and compileall: success;
  • exact-head SAST Semgrep and Security Scan are still queued/pending and are non-passing until terminal;
  • predecessor-head checks, reviews, and artifacts do not transfer.

Remaining central prerequisites

  1. Integrate ContextualWisdomLab/.github#840 so review-agent dispatch uses a bounded GitHub-compatible envelope and durable dispatch is not falsely failed by optional reaction telemetry.
  2. Integrate the minimal exact-artifact Strix successor ContextualWisdomLab/.github#1009 and require authoritative exact-head structured Strix evidence.
  3. Integrate the fail-closed Dependency Review repair ContextualWisdomLab/.github#897, then rerun this unchanged accepted tree and require the actual immutable-pinned Dependency Review action to execute and succeed rather than being skipped.
  4. Obtain a qualifying independent current-head source review, validate every current finding, and resolve only addressed threads.
  5. Immediately before integration, refetch exact head, live base, ancestry, live ruleset, workflows, reviews, findings, and threads.

Keep Draft. Merge only the unchanged accepted tree through normal protected governance. Do not self-approve, bypass protections, synthesize status/review evidence, or infer acceptance from wrapper-green, skipped, queued, stale, or predecessor evidence.

@coderabbitai

coderabbitai Bot commented Aug 12, 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: Pro Plus

Run ID: bb811325-9d1e-4008-bc59-1a75ffafde86

📥 Commits

Reviewing files that changed from the base of the PR and between 7faf7a3 and 88a13f4.

📒 Files selected for processing (4)
  • docs/decision-evidence.md
  • src/egressweave/schemas/decision-evidence-v1.schema.json
  • tests/test_decision_evidence_authority_schema.py
  • tests/test_decision_evidence_schema_current_main.py

📝 Walkthrough

Walkthrough

authority가 소문자 DNS 호스트명과 1..65535 포트를 포함하도록 JSON 스키마를 강화했습니다. URL, 인증 정보, 경로, IP 리터럴, 잘못된 호스트명과 포트를 거부하는 테스트를 추가하고 기존 로더 테스트를 갱신했습니다.

Changes

authority 검증 강화

Layer / File(s) Summary
authority 스키마와 계약 갱신
src/egressweave/schemas/decision-evidence-v1.schema.json, docs/decision-evidence.md
authority에 3~259자 길이, 소문자 DNS 호스트명, 1..65535 포트를 요구하도록 변경했습니다. 거부 조건과 allowed_methods 계약을 문서화했습니다.
authority 형식 회귀 테스트
tests/test_decision_evidence_authority_schema.py
허용되는 호스트명과 포트, 호스트명 길이 한계를 검증합니다. URL, 인증 정보, 경로, 대문자, 잘못된 DNS 라벨, IPv4·IPv6, 범위를 벗어난 포트를 거부합니다.
로더 스키마 기대값 정렬
tests/test_decision_evidence_schema_current_main.py
기존 스키마 및 로더 검증이 새로운 authority 형식과 일치하도록 갱신했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 버전이 지정된 evidence authority 스키마의 보안 제한을 명확하게 요약하며 변경 사항의 주요 목적과 일치합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch security/bound-decision-evidence-authority-schema-main

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.

@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 18:50
@seonghobae
seonghobae marked this pull request as draft August 12, 2026 21:09
@seonghobae
seonghobae marked this pull request as ready for review August 12, 2026 23:13
@seonghobae
seonghobae marked this pull request as draft August 13, 2026 01:04

Copy link
Copy Markdown
Contributor Author

@coderabbitai review
@opencode-agent review
@cwl-noema-review review

Review exact current head 88a13f42383cfdb470926ffeb6770c467b12e498 only against live protected main 7faf7a3b8a47980113982914000e724ab6a6cda5. Validate schema/runtime parity for canonical lowercase ASCII/IDNA hostnames plus exact TCP ports, label and total-hostname bounds, rejection of URL/credential/path/IP-literal/non-canonical authority forms, packaged-schema and detached-loader parity, privacy/minimization wording, and the bounded four-file scope. Submit a real current-head source-review verdict; do not mutate, merge, or infer approval from wrapper/check/model evidence.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 13 minutes and 38 seconds before sending another message.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head source review for b44d414234e36966960730b2767e439b2b771dc0 found no blocking defect in the four-file decision-evidence schema scope. The final pattern now rejects the same dot-compacted 0x legacy authority class as runtime, including 0x7f.0.0.1 and 0.x7f, while preserving lowercase IDNA/ASCII hostname labels, the 253-byte hostname ceiling, TCP ports 1..65535, and every existing URL, credential, path and IP-literal exclusion. Independent packaged-schema parity, detached-loader behavior, buyer documentation, Python 3.10–3.14 package acceptance, 1,028 tests and exact 100% production statement/branch coverage are current-head green. This is author-side review evidence only, not independent approval. Keep Draft until exact-head SAST/Security are terminal and the corrected central Dependency Review/Strix paths plus qualifying independent review are protected and current.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review review

Review exact current head b44d414234e36966960730b2767e439b2b771dc0 against protected main@7faf7a3b8a47980113982914000e724ab6a6cda5. Validate runtime/schema parity for dotted hexadecimal legacy authority spellings, canonical lowercase IDNA/ASCII hostname and port bounds, detached packaged-schema loading, preserved privacy minimization, and the immutable RED→GREEN evidence on Python 3.10–3.14. Submit a formal independent verdict only for this head after current required checks are terminal. Do not mutate, merge, or promote wrapper-green Dependency Review while its actual pinned action is skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant