feat(httpd): wire --allow-net cap check (ILO-381)#639
Merged
danieljohnmorris merged 1 commit intoMay 22, 2026
Conversation
`ilo httpd` now requires `--allow-net` to be supplied; without it the process exits 1 with "ilo httpd needs --allow-net to listen on a port" before touching the network. Adds `--allow-net` flag to `HttpdArgs`, `build_httpd_caps()` helper, and two integration tests in `capability_flags.rs` covering the refuse-without-flag and pass-with-star cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
--allow-netflag toHttpdArgs(mirrors theRunArgspattern from ILO-59)httpd_cmdnow callscaps.check_net("0.0.0.0")before binding the TCP socket; exits 1 with"ilo httpd needs --allow-net to listen on a port"if the check failsbuild_httpd_caps()helper: no--allow-netflag →Caps::Restricted { net: Policy::List([]) }(deny all);--allow-net=*→Policy::All; specific hosts are passed throughCaps::parse_allowTODO(ILO-59)comment left in the httpd block commentBuilds on:
httpd_cmdimplementationsrc/caps.rs+Caps::check_netTest plan
httpd_refuses_to_start_without_allow_net— verifies exit non-zero + error message when--allow-netis omittedhttpd_passes_cap_check_with_allow_net_star— verifies cap error absent when--allow-net *is supplied🤖 Generated with Claude Code