Repository navigation
feat(sandbox): multi-tier networking options and decommission task.md (#207) - #208
Merged
dan-petty merged 12 commits intoSep 14, 2026
Merged
Conversation
dan-petty
added a commit
that referenced
this pull request
Sep 14, 2026
dan-petty
marked this pull request as ready for review
September 14, 2026 14:56
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical sandbox networking and secret-output issues block approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds multi-tier sandbox networking across Docker/Kubernetes, GitHub rate-limit handling, ignore-aware scanning, and modular task documentation.
Changes:
- Adds sandbox network modes and CLI/MCP options.
- Improves GitHub quota handling, security validation, and repository traversal.
- Replaces the monolithic task index with per-task documentation.
File summaries
| File | Summary |
|---|---|
uv.lock |
Dependency lock updates |
tests/test_workload_sandbox.py |
Workload sandbox tests |
tests/test_subsystem_containment_and_redaction.py |
Containment and redaction tests |
tests/test_sandbox_traces.py |
Trace security tests |
tests/test_sandbox_probe.py |
Probe protection tests |
tests/test_sandbox_lifecycle.py |
Sandbox lifecycle tests |
tests/test_reference_extractor.py |
Reference extraction tests |
tests/test_pydantic_ai_profiles_and_providers.py |
Provider and profile tests |
tests/test_providers.py |
Provider tests |
tests/test_process.py |
Process handling tests |
tests/test_pr_cmd.py |
Pull-request command tests |
tests/test_k8s_context.py |
Kubernetes context tests |
tests/test_harness.py |
Harness tests |
tests/test_github_ssh.py |
GitHub SSH tests |
tests/test_github_rate_limiter.py |
Rate limiter tests |
tests/test_github_projects.py |
Project synchronization tests |
tests/test_github_milestones.py |
Milestone tests |
tests/test_gh_cmd.py |
GitHub command tests |
tests/test_devcontainer.py |
Devcontainer tests |
tests/test_config_commands.py |
Configuration command tests |
tests/test_common_hallucinations.py |
Review heuristic tests |
tests/test_architectural_invariants.py |
Architecture checks |
tests/mock_provider.py |
Provider test fixture |
tests/conftest.py |
Shared test fixtures |
src/devops_cli/watchers/file_watcher.py |
Ignore-aware file watching |
src/devops_cli/telemetry/waterfall.py |
Telemetry endpoint validation |
src/devops_cli/security/kubeconform.py |
Ignore-aware manifest scanning |
src/devops_cli/security/gitleaks.py |
Ignore-aware secret scanning |
src/devops_cli/security/complexity.py |
Ignore-aware complexity scanning |
src/devops_cli/security/checkov.py |
Ignore-aware security scanning |
src/devops_cli/security/__init__.py |
Security exports |
src/devops_cli/sandbox/models.py |
Network modes and policy generation |
src/devops_cli/sandbox/engine.py |
Long-running sandbox networking |
src/devops_cli/output/formatters/tables.py |
Output formatting |
src/devops_cli/models/vulnerability.py |
Network reference models |
src/devops_cli/lang/en/help.py |
CLI help text |
src/devops_cli/github/ssh.py |
Rate-limited GitHub SSH operations |
src/devops_cli/github/rate_limiter.py |
GitHub pacing, caching, and retries |
src/devops_cli/github/projects.py |
Task tracking migration |
src/devops_cli/docker/sandbox.py |
Docker network configuration |
src/devops_cli/core/repo.py |
Git-ignore matching and traversal |
src/devops_cli/core/process.py |
Sanitized process handling |
src/devops_cli/core/process_pipeline.py |
Process pipeline updates |
src/devops_cli/config/settings.py |
GitHub CLI integration |
src/devops_cli/config/options.py |
Configuration options |
src/devops_cli/config/defaults.py |
Sandbox defaults |
src/devops_cli/config/constants.py |
Networking and policy constants |
src/devops_cli/config/__init__.py |
Configuration exports |
src/devops_cli/commands/vault.py |
Vault workflow updates |
src/devops_cli/commands/test_cmd.py |
Test sandbox options |
src/devops_cli/commands/sandbox.py |
Sandbox CLI and policy handling |
src/devops_cli/commands/pr.py |
Pull-request workflow integration |
src/devops_cli/commands/k8s/cluster_runtime.py |
Kubernetes runtime safeguards |
src/devops_cli/commands/k8s/cluster_context.py |
Kubernetes context safeguards |
src/devops_cli/commands/docker.py |
Docker sandbox options |
src/devops_cli/commands/devcontainer.py |
Devcontainer integration |
src/devops_cli/commands/config.py |
Configuration command integration |
src/devops_cli/argo/gitops.py |
Ignore-aware GitOps scanning |
src/devops_cli/ai/tools/builtin_tools.py |
Ignore-aware file tools |
src/devops_cli/ai/tasks/review.md |
Review task guidance |
src/devops_cli/ai/review/runner.py |
Ignore-aware review collection |
src/devops_cli/ai/review/pipeline.py |
Review pipeline updates |
src/devops_cli/ai/review/common_hallucinations.py |
Review heuristic handling |
src/devops_cli/ai/review/common_hallucinations.json |
Hallucination catalog |
src/devops_cli/ai/review/chunker.py |
Review chunking |
src/devops_cli/ai/repomap.py |
Ignore-aware repository mapping |
src/devops_cli/ai/rag/indexer.py |
Ignore-aware RAG indexing |
src/devops_cli/ai/providers/__init__.py |
Provider exports |
src/devops_cli/ai/mcp/server.py |
Sandbox MCP parameters |
src/devops_cli/ai/library/drift_auditor.py |
Ignore-aware drift auditing |
src/devops_cli/ai/instruction_generator.py |
Instruction generation |
src/devops_cli/ai/harness/slots.py |
Harness integration |
src/devops_cli/ai/harness/planning.py |
Planning integration |
src/devops_cli/ai/harness/filesystem.py |
Ignore-aware filesystem access |
src/devops_cli/ai/ast/graph.py |
Ignore-aware AST discovery |
README.md |
Project reference updates |
docs/SELF_IMPROVEMENT.md |
Review guidance |
docs/SDLC.md |
Workflow documentation |
docs/ROUTINE_TASKS.md |
Routine task updates |
docs/ROADMAP.md |
Roadmap updates |
docs/MCP_TOOLS.md |
MCP documentation |
docs/commands/test.md |
Test command documentation |
docs/commands/sandbox.md |
Sandbox command documentation |
docs/commands/gh.md |
GitHub command documentation |
docs/commands/docker.md |
Docker command documentation |
docs/CLI_REFERENCE.md |
CLI reference updates |
docs/agent/tasks/task-207-sandbox-multi-tier-networking-options.md |
Networking task tracking |
docs/agent/tasks/task-205-remediate-review-findings-self-improvement.md |
Review remediation tracking |
docs/agent/tasks/task-204-remediate-devsecops-findings-self-improvement.md |
Security remediation tracking |
docs/agent/tasks/README.md |
Modular task workflow |
docs/agent/README.md |
Agent documentation |
config.example.yaml |
Configuration template updates |
Review details
Suppressed comments (16)
docs/SELF_IMPROVEMENT.md:183
- This entry claims all bare
ghinvocations were replaced, but multiple GitHub modules still callrun_subprocessdirectly withCONST_GH_CLI(for examplegithub/secrets.py,github/issues.py,github/pr_threads.py,github/pages.py, andgithub/client.py). Those paths bypass pacing, retries, and caching, so either migrate every caller or narrow this documentation claim.
6. **Native DevOps CLI GitHub Rate Management**:
- Replaced bare `gh` invocations with native `devops gh` and centralized `run_gh()` runner featuring token-bucket pacing, quota safety thresholds, exponential backoff with jitter on secondary rate limits, and TTL read caching.
docs/commands/sandbox.md:33
- The newly added option rows leave
--networkdocumented as allowinghost, butSandboxNetworkConfigexplicitly rejects host networking at runtime. Users therefore receive contradictory guidance in this generated command reference; update the legacy row and regenerate the other help/reference surfaces together.
| `--network-mode` | `string` | - | Multi-tier network mode: isolated | sandbox_namespace | public_whitelist | local_whitelist | bridge |
src/devops_cli/ai/rag/indexer.py:72
- This repeats the unsupported
gitignorepattern factory, but the broad exception hides the failure and disables the compiled.gitignorematcher for RAG indexing. Usegitwildmatchso ignored files are filtered without falling back to the per-file Git subprocess.
return pathspec.PathSpec.from_lines("gitignore", patterns) if patterns else None
src/devops_cli/commands/sandbox.py:1049
- The command emits a NetworkPolicy with caller-provided
nameandnamespacewithout Kubernetes RFC 1123 validation. Inputs such as--namespace bad_nameexit successfully but produce a manifest that Kubernetes rejects; validate the namespace and the resulting policy name before serializing.
src/devops_cli/core/repo.py:96 - The cached
specis constructed withPathSpec.from_lines("gitignore", ...), but the repository's locked pathspec integration documents the supported factory asgitwildmatch(src/devops_cli/ai/knowledge_base/devops_cli/libraries/pathspec.md:37-53). With a non-empty.gitignore,is_ignored_by_gitcan fail before this check and break repository scans; switch that factory to the supported one.
src/devops_cli/core/repo.py:105 - For every candidate that the in-memory PathSpec does not match, this fallback starts a separate
git check-ignoreprocess. The new traversal callers invokeis_ignored_by_git()once per file or directory, so scanning a large repository now incurs one process startup per unignored candidate and can become a major bottleneck; batch Git checks or cache the complete ignore decision set.
src/devops_cli/github/rate_limiter.py:79 - The detector does not match GitHub's primary quota error wording (
API rate limit exceeded); its patterns requirealready,secondary, a 429, or other phrases.run_ghtherefore treats a primary 403 quota failure as an ordinary error and skips rate-limit handling, contrary to this helper's contract.
src/devops_cli/github/rate_limiter.py:133 - The cache key omits repository context. Read commands such as
gh pr listorgh pr view 1resolve the repository from the current working directory when--repois absent, so a result from repository A can be served in repository B during the TTL. Include the same repository-resolution inputs in the key or cache only fully qualified repository requests.
src/devops_cli/sandbox/models.py:56 - The endpoint parser splits every unbracketed colon, so a valid bare IPv6 address such as
2001:db8::1becomes2001; the slash branch also drops a CIDR prefix before policy generation. The advertised IP/CIDR whitelist support therefore cannot represent IPv6 or preserve IPv6/IPv4 prefix lengths. Parse IP networks/addresses before applying host:port heuristics and retain the original prefix.
src/devops_cli/security/checkov.py:96 - The new traversal path calls
is_ignored_by_gitonce per candidate; when the in-memory matcher does not match, that helper launches a separategit check-ignoresubprocess. Native fallback scans can therefore spawn one Git process per file on large repositories, causing a substantial runtime regression; batch the Git query or reuse a precomputed matcher for the whole scan.
tests/test_reference_extractor.py:1179 - This new deduplication fixture adds another concrete homelab hostname (
homelab.local) to the test corpus. Replace it with a generic placeholder such aslocalhost; private infrastructure names must not be introduced in committed tests.
tests/test_reference_extractor.py:1257 - This sorting fixture reintroduces the concrete
argocd.homelab.localhostname. Use a generic local placeholder instead; committed tests must not encode private homelab topology or names.
tests/test_reference_extractor.py:1266 - This newly added test fixture uses a private RFC1918 address (
192.168.49.2) as mock data. Use127.0.0.1or an RFC 5737 documentation address instead so committed tests do not publish concrete private-network details.
tests/test_reference_extractor.py:1133 - These new URL-splitting fixtures use invented hostnames
node1andnode2, which are treated as concrete internal infrastructure placeholders under the repository's test-data policy. Use the same genericexample.comhost with distinct ports to test comma splitting without encoding topology.
tests/test_sandbox_networking.py:185 - This new local-whitelist fixture adds concrete private RFC1918 addresses to committed tests, contrary to
AGENTS.md:27. Keep the boundary coverage but derive or abstract the private targets instead of recording192.168.1.50and10.0.0.5as test data.
tests/test_sandbox_traces.py:199 - These new fixtures embed RFC1918 addresses in committed tests.
AGENTS.md:27prohibits recording concrete private RFC1918 IPs in tests and documentation; use an approved generated/abstract fixture mechanism while retaining the private-range coverage.
- Files reviewed: 96/97 changed files
- Comments generated: 19
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dan-petty
force-pushed
the
feat/207-sandbox-multi-tier-networking-options
branch
from
September 14, 2026 21:20
baf82c2 to
e9a0e46
Compare
dan-petty
deleted the
feat/207-sandbox-multi-tier-networking-options
branch
September 14, 2026 21:28
dan-petty
added a commit
that referenced
this pull request
Sep 16, 2026
* feat(release): v0.2.18 * fix(security): harden secret sanitizer boundaries and safe path exclusions (#116) (#203) * fix(security): harden secret sanitizer boundaries and safe path exclusions (#116) * fix(release): default release PRs to draft mode * fix(security): harden secret boundaries, remove extension lookahead, and update task status (#116) * fix(security): remediate devsecops findings and add native rate management (#204) * test * fix(security): remediate devsecops findings and add native rate management * docs(task): update task-204 status to in review and link PR #204 * fix(security): permit token masking in filesystem path arguments * fix(security): remediate review findings, exclude home in sandbox, and relocate MockProvider (#205) (#206) * fix(security): remediate review findings, exclude home in sandbox, and relocate MockProvider (#205) * docs(task): update task-205 status to in review and link PR #206 * test(sandbox): provide explicit tmp_path workspace_dir in test_docker_sandbox_wait_timeout * fix(rag): support both gitignore and gitwildmatch pathspec factories * feat(sandbox): multi-tier networking options and decommission task.md (#207) (#208) * feat(sandbox): multi-tier networking options and decommission task.md index (#207) * docs(agent): transition task 207 to in-review with PR #208 * test(projects): update test fixtures to eliminate task.md references * fix(security): replace concrete RFC 1918 and internal homelab endpoints with standard documentation values * fix(sandbox): harden network containment, secret output masking, and rate limiter caching * fix(sandbox): remediate egress containment, dns resolution, and output masking findings (#207) * fix(security): stream sandbox container output directly to sys streams avoiding logger sink cleartext alerts (#207) * docs(agents): mandate working pull requests from oldest to newest (FIFO) * docs(roadmap): add v0.2.23 reactive workstation command center and interactive TUI * docs(agents): mandate root-cause remediation, roadmap synthesis, and interaction improvement * fix(docs): escape placeholder angle brackets and prune completed roadmap matrix items * fix(security): stream sandbox output via centralized output writers to resolve codeql cleartext alerts * fix(k8s): uncap ollama memory limits and elevate daemonset/deployment thresholds (#209) (#210) * fix(k8s): uncap ollama memory limits and elevate daemonset/deployment thresholds (#209) * fix(k8s): add CoreDNS resource configs and tighten test assertions (#209) * fix(github): enforce gh request throttling, disk quota persistence, and diff-only project sync (#211) (#212) * fix(github): enforce window-budgeted rate pacing, disk quota persistence, and diff-only project sync (#211) * docs(agent): record PR #212 in task 211 tracking * fix(github): enforce low-quota circuit breakers, preamble-tolerant JSON parsing, and casing-safe project diffing (#211) * fix(github): replace quota thresholds with logical exponential backoff (#211) * test(github): patch run_gh instead of run_subprocess in reconcile tests (#211) * fix(github): derive rate limit pacing from actual response values without hardcoded windows (#211) * fix(ci): stop running all of the ci tasks every time a pr is marked ready for review. * fix(ci): decouple project automation into dedicated workflow and add quota safety guards (#211) * fix(github): align rate limiter baseline velocity and add quota test coverage (#211) * refactor(ai): eliminate inline function parameter defaults in favor of defaults submodule * fix(github): enforce strict non-negative rate quotas, 25% threshold, and remediate review findings (#211) * fix(typecheck): resolve Path None guard and optional quota remaining in mypy (#211) * docs: refresh CLI and MCP references for updated commands and errors (#211) * fix(ci): enforce mandatory pre-push devops ci gate, handle unauthenticated acquire, and expand test coverage (#211) * fix(pr): align checks fallback to run_subprocess and isolate rate limiter sleep test (#211) * fix(ci): complete pre-push gate, argo drift tests, and coverage expansion (#211) * docs(agent): update task-211 documentation with linear window pacing and pre-push quality gate (#211) * fix(pr): guard pr ready against failing checks and fix project automation uv sync (#211) * docs(pr): update cli and mcp reference for pr ready --force * fix(github): address pr 212 review comments on workflows, sandbox, defaults, and rate limiter (#211) * fix(security): derive artifact version from package metadata and validate whitelist tokens (#211) * feat(security): sigstore cosign container provenance and image signing (#112) (#213) * fix(ci): prune all merged PR devcontainer images from ghcr and guard in-flight builds * feat(security): sigstore cosign container provenance and image signing (#112) * docs(agent): link PR 213 in task 112 tracking doc * fix(security): resolve review comments for cosign container provenance (#112) * ci: re-trigger validation after resolving all review threads * feat(security): falco ebpf runtime security and anomaly streamer (#113) (#214) * feat(security): falco ebpf runtime security and anomaly streamer (#113) * fix(security): resolve review comments for falco ebpf runtime security (#113) * chore: retrigger validation after resolving all review threads * feat(security): distributed threat intelligence valkey l2 cache and radar batching (#122) (#215) * feat(security): distributed threat intelligence valkey l2 cache and radar batching (#122) * fix(security): resolve review comments for threat intel valkey l2 cache and batching (#122) * chore: retrigger validation after resolving all review threads * perf(github): adjust rate limit no-delay used threshold to 30%
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.
Summary
Closes #207.