Repository navigation
test: check that CKAN_PRIVATE_HOSTS reaches the safe agents' lookup - #596
Merged
aborruso merged 1 commit intoNov 12, 2026
Merged
Conversation
Also drops the redundant local in isPrivateHostAllowed (review of ondata#594). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
[Low impact] This PR appears safe to merge.
|
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.
The two optional items from your review of #594.
localhost, which, unlike an IP literal, goes through their DNS lookup. WithCKAN_PRIVATE_HOSTS=localhostit reaches a local listener. After the list is changed, the same agents refuse it, so the list is read at lookup time and not when the agents are built.const raw = privateHosts;inisPrivateHostAllowedis gone. No behaviour change.How to check.
npm test: 739 passed, 6 skipped (738 onmain, plus this test).http.tsbuilds the agents without the list (createSafeAgents(() => '')): "Access to private/internal IP addresses is not allowed ("localhost" resolves to 127.0.0.1)".npm run buildandnpm run build:workersucceed.AI assistance: prepared with Claude (Anthropic) under my direction and review, with automated reviews before opening.