Skip to content

rfc: extend PostNetworkAccess for response inspection and replacement - #8

Merged
trend-kyle-huang merged 3 commits into
mainfrom
codex/network-response-inspection-rfc
Sep 15, 2026
Merged

trend-kyle-huang merged 3 commits into
mainfrom
codex/network-response-inspection-rfc

Conversation

@trend-kyle-huang

@trend-kyle-huang trend-kyle-huang commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An allowed outbound request can return content that an agent should not receive unchanged. RFC 0005 extends PostNetworkAccess so a capable host reports the network result while holding the complete response body for inspection, replacement, or refusal before delivery.

The network lifecycle keeps the existing pair: PreNetworkAccess controls request dispatch; PostNetworkAccess can control response content before the caller receives it. All 18 Core event names are retained. For example, a completed HTTP 200 response can keep its network success result while the host delivers sanitized content or withholds the body.

Proposed contract

  • Make Post Gate-capable for buffered response delivery, while preserving existing Observe telemetry and explicit capability declarations.
  • Add complete response-body and recipient fields, and hookSpecificOutput.updatedResponseBodyBase64 for an explicit allow with replacement.
  • Keep network outcome, status, target, and wire byte counts unchanged by content decisions; repeated handler deliveries belong to the same terminal occurrence.
  • Define replacement application, recipient binding, native metadata consistency, and multi-handler decision handling.
  • Preserve fail-open per invocation: a handler failure adds no decision and cannot cancel another handler's denial or accepted replacement.
  • Describe full-body buffering, streaming limitations, quarantine boundaries, and acceptance criteria.

This is a proposal-only PR; RFC 0005 remains Draft. Canonical spec, schemas, fixtures, and runtime behavior are unchanged. Current main treats Post as Observe and ignores controls. Adoption requires coordinated updates and explicit configuration of compatible hosts and handlers; structural schema acceptance alone does not enable the proposed behavior.

Repository Discussions are disabled. The prerequisite Discussion, at least 14 calendar days of public review, and maintainer decision remain pending under GOVERNANCE.md. No acceptance or vendor endorsement is claimed.

Related enterprise proposal: #1.

Website impact

  • Add a clearly labeled Draft RFC 0005 / PR rfc: extend PostNetworkAccess for response inspection and replacement #8 entry to the website homepage, explaining that the published Post contract remains Observe until adoption.
  • Update the website participation and governance pages with same-PR website synchronization guidance and stable RFC numbering.
  • Add the synchronization rule to the root README and CONTRIBUTING guide, with a source-to-website checklist covering directly rendered spec files, manual site summaries, and published schema copies.
  • Add a PR template requiring a Website impact explanation and checks. Unaffected website content needs no artificial edit; authors must explain why no update is needed.
  • Clarify that RFC revisions and implementation follow-ups reuse the existing proposal number. This PR continues RFC 0005.

The website changes are included in this PR. PR CI builds them; the live Pages site updates after merge to main and successful deployment (or manual dispatch).

Validation

  • npm run validate and npm run build — passed.
  • git diff --check — passed.
  • Checked the generated homepage, participation page, and governance page for the proposal status, PR link, synchronization guidance, and RFC numbering explanation.
  • Checked all three JSON examples against the current schemas, matching event/response correlation, strict base64 round trips, and the six-byte original versus ten-byte replacement without changing the recorded wire count.
  • Confirmed the canonical spec, both published schema copies, and all 18 Core event names remain unchanged.

These are document and repository checks. The listed host acceptance cases require later implementation and integration tests.

Checklist

  • Website impact reviewed; all affected content is updated in this PR.
  • Site summaries and proposal status match the source; canonical spec/schema behavior remains unchanged.
  • npm run validate and npm run build passed.
  • Proposed behavior is clearly distinguished from the current specification.

@trend-kyle-huang trend-kyle-huang changed the title rfc: propose network response inspection before delivery rfc: extend PostNetworkAccess for response inspection and replacement Sep 15, 2026
@trend-kyle-huang
trend-kyle-huang marked this pull request as ready for review September 15, 2026 07:43

@trend-brian-chuang trend-brian-chuang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This proposal directly addresses the enterprise blind spot we identified during autonomous agent runtime security testing and our recent discussions with the NVIDIA team. In particular:

  1. Dual-role Pre/Post Symmetry: Keeping all 18 Core event names while empowering PostNetworkAccess with buffered gating and quarantine capabilities provides a clean, elegant contract without proliferating event types.
  2. Clear Separation of Network Facts vs. Content Actions: Preserving original wire telemetry (outcome, status_code, bytes_recv) while allowing updatedResponseBodyBase64 or content denial (deny) resolves the auditing dilemma in proxy/relay governance.
  3. Enterprise Alignment: In our NeMo Relay integration, inspecting incoming Magic Bytes and sanitizing inbound payloads before runtime execution is essential for preventing Linux ELF/PE dropper execution. Having a standardized updatedResponseBodyBase64 and explicit quarantine behavior under Core 0.1 provides a consistent target for both host and security vendors.

All good on my end.

@trend-kyle-huang
trend-kyle-huang merged commit f24ad8d into main Sep 15, 2026
5 checks passed
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.

2 participants