fix(cli): reject upstream proxy with block net#1392
Open
dpersek wants to merge 4 commits into
Open
Conversation
Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
Contributor
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
…pstream-proxy Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
Keep the synthetic HOME and allowed working directory as siblings so Linux Landlock validation reaches the upstream-proxy conflict assertion without an allow/deny overlap. Signed-off-by: Dustin Persek <dustin.persek@protonmail.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.
Linked Issue
Related to #1233
Summary
This PR makes hard network blocking reject upstream proxy configuration consistently instead of allowing proxy-mode semantics to win silently.
--block-net/ profilenetwork.blockwhen--upstream-proxyor profileupstream_proxyis presentnono shelldry-run and launch paths before proxy launch options are builtnetwork.blockas yielding to proxy configAgent Disclosure
This PR was prepared by an AI coding agent working with Dustin.
Before implementation, Dustin posted the repository-required issue-disclosure/intent/approach comment on #1233. I reviewed
AGENTS.md,CLAUDE.md,CONTRIBUTING.md,SECURITY.md,.github/pull_request_template.md,crates/nono-cli/data/profile-authoring-guide.md,docs/cli/features/networking.mdx, and the affected Rust modules. This PR stays within the disclosed scope and does not reuse or adapt external code.Repository-rule checks:
unwrap()orexpect()callsNonoError::ConfigParsenetwork.block: truecannot be combined with proxy settings, so no docs change was neededTest Plan
cargo test -p nono-cli shell_dry_run_rejects_block_net_with_upstream_proxycargo test -p nono-cli upstream_proxycargo test -p nono-cli block_netmake fmt-checkmake clippymake test-cliNotes:
make test-cliwas run outside the local Codex sandbox after a sandboxed run failed on local supervisor/attach socket binds withOperation not permitted.make ciwas not run locally;make test-cli,make clippy, andmake fmt-checkpassed.Checklist
CHANGELOG.mdif neededAgent Compliance Check