[Schema 0.8] Contradictory spec and parser semantics for an omitted network.ingress.hostLoopback
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 79
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 117
Description
### Relevant area(s)
Linux, macOS, Windows
### Brief description of your issue
The spec and the parser disagree on what an omitted `network.ingress.hostLoopback` means, and the spec contradicts itself.
- **Normative** ([`networking.md:109`](../blob/main/docs/sandbox-policy/0.8.0/networking/networking.md#L109)): "The specific `hostLoopback` value **overrides** `default` for the host-loopback path" — implies absent means inherit `default`.
- **Bubblewrap addendum** (line 481): "An omitted `ingress` section enforces the same deny, since that is the schema's default" — implies absolute deny. (Bubblewrap rejects `allow` for both fields, so both readings coincide there; it never disambiguates.)
- **JSON schema**: both fields optional, no `default` declared.
- **Parser** (`network_parser.rs:300`): `unwrap_or_default()` → `Deny`, independent of `default`.
The readings diverge only when `ingress.default: "allow"` and `hostLoopback` is omitted: inherit → `allow`, parser → `deny`.
Not academic — it changes Windows acceptance. `network_parser.rs:592` requires `hostLoopback: "allow"` for a ProcessContainer proxy without `allowedProxyPeer`; today omission resolves to `deny` and the config is rejected, but under inheritance it would be accepted.
Found while investigating #1021.
### Steps to reproduce
1. Author a 0.8 config with `network.ingress.default: "allow"` and no `hostLoopback`.
2. Observe the parser resolves `host_loopback` to `Deny` instead of inheriting `Allow`.
3. On Windows, add a ProcessContainer `runtimeConfig.networkProxy` without `allowedProxyPeer`; observe rejection with "requires `network.ingress.hostLoopback='allow'`" despite `ingress.default` already being `"allow"`.
### Expected behavior
One documented rule for an omitted `hostLoopback`, applied consistently by the parser and all backends, with the schema stating the default if one exists. Either fix `convert_ingress` to inherit and reword the addendum, or reword the normative "overrides" sentence to state absolute deny.
### Actual behavior
Normative text implies inheritance, an addendum asserts deny, the schema declares nothing, and the parser implements deny. Callers can't tell what omitting the field does.
Contributor guide
Assessment
This issue has not been assessed yet.