feat(nono): add restrictive core policy contract
This commit is contained in:
@@ -43,9 +43,9 @@ Ask about exact files, credential routes, and Unix sockets only when the request
|
||||
|
||||
Completion criterion: map every requested capability to an exact path, hostname, credential route, or socket and an explicit access level.
|
||||
|
||||
### 3. Choose a safe parent
|
||||
### 3. Choose safe composition
|
||||
|
||||
Use one `extends` parent; build a transitive chain rather than multiple inheritance.
|
||||
Nono 0.74 accepts either one `extends` parent or an ordered array. Multiple parents merge left to right, deduplicate shared ancestors, append list-valued grants and environment filters, and preserve restrictive decisions such as blocked networking. Use a single parent for ordinary profiles. Use multiple parents only when every additive capability and merge result has been reviewed with `nono profile show` and behavioral tests.
|
||||
|
||||
Apply these inheritance rules:
|
||||
|
||||
@@ -53,6 +53,7 @@ Apply these inheritance rules:
|
||||
- Extend `nolabs-ai/pi` for offline mode. Set `network.block` to `true`, clear `open_urls.allow_origins`, disable `open_urls.allow_localhost`, and set `allow_launch_services` to `false`. Do not extend allowlisted `pi-local`: inherited proxy domains conflict with blocked networking.
|
||||
- Extend `nolabs-ai/pi` rather than `pi-local` when an allowlisted child needs fewer domains than `pi-local`, or when creating an open-network profile. Reproduce only the required local filesystem/socket policy.
|
||||
- Edit `pi-local` only after showing how the change affects every future project launched with it.
|
||||
- For trusted generated profiles, materialize the reviewed fragments into one canonical profile and validate that file. Do not rely on multiple inheritance to widen a blocked core with a provider route.
|
||||
|
||||
An inherited broad capability cannot reliably be narrowed by an empty child array. Choose a restrictive parent instead.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user