Skip to content

(7/8) fix(gateways): refuse metadata addresses and escape Codex TOML values - #141

Merged
dizys merged 4 commits into
dizys:mainfrom
0libote:fix/gateway-metadata-codex
Nov 14, 2026
Merged

dizys merged 4 commits into
dizys:mainfrom
0libote:fix/gateway-metadata-codex

Conversation

@0libote

@0libote 0libote commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

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-host code 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 --check clean on all touched files.

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.
@0libote

0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Seventh (7 of 8). Heads up: this branch carries its own copy of the smoke-expectation line from #148, but they merge together fine (checked). Goes after #148, #145, #146, #144, #143, #142.

@0libote 0libote changed the title fix(gateways): refuse metadata addresses and escape Codex TOML values (7/8) fix(gateways): refuse metadata addresses and escape Codex TOML values Nov 14, 2026
@dizys
dizys merged commit 49f9309 into dizys:main Nov 14, 2026
14 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