Repository navigation
(7/8) fix(gateways): refuse metadata addresses and escape Codex TOML values - #141
Merged
Merged
Conversation
Metadata ranges (169.254.0.0/16, fd00:ec2::254) are now refused with a distinct metadata-host code even with private-host consent, so no gateway or management key is ever sent there. parseAddress also rejects quote, backslash and backtick, and Codex launch arguments TOML-escape values.
The mapped literal 0:0:0:0:0:ffff:a9fe:a9fe (::ffff:169.254.169.254) fell through to private-host at parse and relied on the transport pin to refuse it. parseAddress now checks resolved-form metadata too. The transport test pins the new codes with and without consent.
The smoke installs the latest Claude Code and asserts the context window the binary reports for the fixture model. Claude now reports 1000000 where it reported 200000, failing the core smoke on every PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Private-host consent also unlocked link-local and cloud-metadata ranges, so a gateway or management key could be sent to 169.254.169.254 after one tick. Metadata ranges are now refused with a distinct
metadata-hostcode at parse, DNS-pin, probe, and hub layers even with consent, while loopback, home-network, and Compose-name consent is unchanged. Separately, a gateway URL containing", \, or a backtick broke the Codex TOML override and bricked that agent; those characters are rejected at parse and values are TOML-escaped where the launch arguments are built.Validation: new metadata/Codex regression tests plus the existing gateway address, probe, adapters, service, model, and processes suites pass (88 + 125 focused tests);
node --checkclean on all touched files.