Repository navigation
fix(init-firewall): unblock startup on dead allowlist host (#94) - #96
Merged
Merged
Conversation
`statsig.anthropic.com` no longer resolves (Statsig migration), and the resolver loop's `exit 1` was killing `postStartCommand` for every consumer of these scripts. Two fixes: - Drop `statsig.anthropic.com` from the allowlist in both `.devcontainer/claude-sandbox/init-firewall.sh` and `claude-bun/.devcontainer/init-firewall.sh`. - Make the resolver tolerant: log `WARN` and `continue` instead of exiting. The default-DROP OUTPUT policy plus the explicit REJECT rule keep the perimeter fail-closed — a skipped host gets no allow rule, which is the desired posture. Bundled adjacent consistency fix in `claude-bun`: add `-exist` to the two `ipset add` calls so duplicate IPs returned by DNS no longer abort the script (matches the existing `claude-sandbox` script and avoids the failure mode in anthropics/claude-code#35197).
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.
What
Fixes #94.
init-firewall.shno longer aborts container startup when an allowlist host stops resolving in DNS, and removes the now-deadstatsig.anthropic.comentry that triggered the regression.Why
statsig.anthropic.comhas been retired as part of Anthropic's ongoing migration off Statsig (anthropics/claude-code#7151). The resolver loop in both copies ofinit-firewall.shtreated any unresolvable host as fatal (exit 1), so VS Code'spostStartCommandfailed and the devcontainer was unusable for any consumer that bind-mounts these scripts unmodified — including theclaude-codetemplate,claude-bun, and this repo's own sandbox. Same upstream bug is open as anthropics/claude-code#55623.Changes
statsig.anthropic.comfrom the allowlist loop in.devcontainer/claude-sandbox/init-firewall.shandclaude-bun/.devcontainer/init-firewall.sh.statsig.comstays.WARN: Failed to resolve <host> — skippingandcontinueinstead ofexit 1. The default-DROPOUTPUTpolicy plus the explicit REJECT keep the perimeter fail-closed — a skipped host simply gets no allow rule, which is the right posture.claude-bun: add-existto bothipset addcalls so duplicate IPs from DNS no longer abort the script.claude-sandboxalready used-exist; this bringsclaude-buninto line and avoids the latent failure mode reported in [BUG] init-firewall.sh fails on duplicate IPs from DNS — container fails to start anthropics/claude-code#35197.Notes
devcontainer.json, README, or CI workflow changes — same script contract, same invocation path.claude-codeplugin variant doesn't ship its own copy of the script (bind-mount), so its consumers inherit the fix automatically.Test plan
claude-sandboxdevcontainer:postStartCommandfinishes withoutFailed to resolveaborting the run.claude-bundevcontainer: same.https://example.comis blocked,https://api.github.com/zenis reachable.bash -nsyntax check on both scripts (already run locally — passes).