Skip to content

--allow-net without --allow-host silently means "allow every host" #5

Open

Description

Problem

ProxyConfig::is_domain_allowed returns true for every domain when the allowlist is empty (crates/shuru-proxy/src/config.rs:121-124 after #3). The README documents --allow-net as "with network access", and nothing in the CLI output tells the user that no filtering is in effect.

For a sandbox whose selling point is egress control, allow-all should never be the silent default when the user forgot a flag.

Proposed behaviour

At minimum, print a warning on startup when --allow-net is set and no --allow-host / network.allow is configured:

warning: --allow-net without --allow-host allows connections to every host

Better: require an explicit opt-in such as --allow-host '*' to get unrestricted egress, and make a bare --allow-net an error. That is a breaking change, so gate it behind a major version or a config key.

Related: #4 (port-443-only allowlist). Both are part of the proxy-protocol-checks branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions