Repository navigation
Description
Context & Rationale
The policy boundary is a set of pure functions: safe_resolve_subpath, validate_no_path_traversal and validate_path_parameter (src/devops_cli/core/paths.py:16-175), the last guarding agent tool kwargs via ai/ext_langchain.py:18 and ai/agents/context.py:19; is_loopback_or_private_host (core/validation.py:81-98); and the whitelist validators and ipBlock builders behind devops sandbox network-policy (sandbox/models.py:55-215). Tests use hand-picked inputs with no IPv6 or NUL case (tests/test_consolidation_core_paths.py:128-171, tests/test_validation.py:190-216); hypothesis is not a dependency. Defects found: _resolve_public_host and _resolve_local_host append /32 to IPv6 addresses (models.py:125,149,163,185), so the docstring "strictly to validated whitelisted destinations" (models.py:190) is false; _extract_host_or_ip truncates IPv6 hosts (models.py:63-65); NUL makes safe_resolve_subpath raise ValueError past error_cls (paths.py:56); a substring .. test rejects benign names; six metadata-name checks in five modules disagree (core/validation.py:40,229, sandbox/probe.py:55, sandbox/models.py:84, telemetry/waterfall.py:127, ai/models/ollama.py:37). vibes' campaign is a fixed event table with an unread seed (lsm_gate.py:257-276); its README accepts 0.85 containment, its pattern claims 1.0.
Scope & Deliverables
- Context & Rationale*: The policy boundary is a set of pure functions:
safe_resolve_subpath,validate_no_path_traversalandvalidate_path_parameter(src/devops_cli/core/paths.py:16-175), the last guarding agent tool kwargs viaai/ext_langchain.py:18andai/agents/context.py:19;is_loopback_or_private_host(core/validation.py:81-98); and the whitelist validators and ipBlock builders behinddevops sandbox network-policy(sandbox/models.py:55-215). Tests use hand-picked inputs with no IPv6 or NUL case (tests/test_consolidation_core_paths.py:128-171,tests/test_validation.py:190-216);hypothesisis not a dependency. Defects found:_resolve_public_hostand_resolve_local_hostappend/32to IPv6 addresses (models.py:125,149,163,185), so the docstring "strictly to validated whitelisted destinations" (models.py:190) is false;_extract_host_or_iptruncates IPv6 hosts (models.py:63-65); NUL makessafe_resolve_subpathraiseValueErrorpasterror_cls(paths.py:56); a substring..test rejects benign names; six metadata-name checks in five modules disagree (core/validation.py:40,229,sandbox/probe.py:55,sandbox/models.py:84,telemetry/waterfall.py:127,ai/models/ollama.py:37). vibes' campaign is a fixed event table with an unread seed (lsm_gate.py:257-276); its README accepts 0.85 containment, its pattern claims 1.0. - Deliverable*: Three PRs. PR1, no new dependency: emit each address's full-length prefix (
ipaddress.ip_network(ip).with_prefixlen) and parse bare and[addr]:portIPv6 withurllib.parse/ipaddress, with IPv6 regression tests. PR2: one metadata predicate on ollama's superset (fd00:ec2::254, baremetadata, trailing dot) at all six sites; NUL raiseserror_cls; a component-wisepart == ".."check after one decode. PR3: addhypothesisto the dev group unless Reach Tally, Replay Gate and Hash-Seed Check for Parser Fuzzing already has, and write properties whose classes come from the oracle, not syntax: forbidden means resolving outside the base after exactly the decoding the consumer does, reaching a non-global or metadata address, or containing NUL (must raiseerror_cls); a benign generator must pass, so deny-everything fails; every emitted ipBlock carries its family's maximum prefix and contains the resolved address. Build addresses withst.ip_addresses(v=..., network=...)and a stubbedgetaddrinfo. Service URLs stay with Structured Fuzzing of Parsers and Schema Boundaries; in-container escapes with Sandbox Enforcement Audit: Declared vs Engine vs Enforced. - Constraint*: The sibling task's CI profile runs explicit examples only, so these tests need a per-test
@settings(phases=[Phase.explicit, Phase.generate], derandomize=True): derandomized generation is fixed per commit, not a lucky search. A property that encodes today's behaviour, such as denying%252e%252e/etc, which pathlib never decodes, passes forever and finds nothing. The metadata predicate widens what five call sites deny; test each. No floor below 1.0: a deterministic predicate that allows one forbidden input has a bug. - Measured*:
uv run --no-sync python /tmp/claude-1000/-workspaces-devops-cli/cd5cb264-de6b-43bc-b9b0-5602359c9515/scratchpad/probe/rewrite/p.py: withgetaddrinfostubbed to one AAAA and one A record,_resolve_public_hostreturned2606:4700::1/32, which covers 2**96 addresses;_extract_host_or_ip("fd00:ec2::254")returnedfd00. Same run:validate_path_parameter("file_path", ...)deniednotes..txt,v1..2.diffanda..b/cbut allowed~/.ssh/id_rsaandfile:///etc/passwdwithallow_absolute=False;safe_resolve_subpath(base, "a\x00b")raisedValueError. - Source*: vibes
patterns/kernel-enforced-lsm-sandbox-containment.md,patterns/zero-trust-sandboxing-and-observability.md,examples/ebpf-lsm-kernel-gate/lsm_gate.py,examples/ebpf-lsm-kernel-gate/README.md,examples/ebpf-lsm-kernel-gate/test_lsm_gate.py,examples/ephemeral-container-sandbox/README.md,observations/systems/34-ebpf-lsm-kernel-gates-and-dynamic-containment-fuzzing.md
Strategic Alignment
- Milestone:
v0.2.24(Reactive Workstation Command Center, Interactive TUI & Unified Operations Hub) - Roadmap Reference:
docs/ROADMAP.md
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(sandbox): emit full-length prefix and parse ipv6 endpoints in net…
fix(security): unify cloud metadata predicate and harden path validat…
feat(security): add hypothesis property tests for sandbox policy boun…
dan-petty commentedon Oct 1, 2026
Closed by #761, merged into
release/v0.2.24.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.24 (#905)