feat(core): persist network approvals in execpolicy#12357
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66af14c3f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…approvals-core # Conflicts: # codex-rs/core/src/network_proxy_loader.rs # codex-rs/core/src/tools/network_approval.rs # codex-rs/network-proxy/src/proxy.rs
dylan-hurd-oai
left a comment
There was a problem hiding this comment.
Couple smaller comments - then would like to add some integration tests for this! Similar to approvals.rs
Once these are addressed, looks good
…approvals-core # Conflicts: # codex-rs/core/tests/suite/approvals.rs
|
adding a allow positive test needed harness changes in how the cloud requirements are setup in the test, so skipped that. |
|
|
||
| let mut candidate = previous_cfg.clone(); | ||
| let (target_entries, opposite_entries) = target.split_lists(&mut candidate); | ||
| let (target_entries, opposite_entries) = candidate.split_domain_lists_mut(target); |
There was a problem hiding this comment.
This is not blocking, but I'm curious about this abstraction and if we can simplify this to avoid passing around mutable references - can fix in a follow-up PR.
Summary
Persist network approval allow/deny decisions as
network_rule(...)entries in execpolicy (not proxy config)It adds
network_ruleparsing + append support incodex-execpolicy, includingdecision="prompt"(parse-only; not compiled into proxy allow/deny lists)network_rule(...)entries when merging with file-based execpolicy*) for persistednetwork_rule(...)