Repository navigation
fix(network-ops): isolate certipy-ad and bloodyAD into uv tool envs - #191
Conversation
…ENG-8935) Remove certipy-ad and bloodyAD from the shared dependencies.python list and install each into its own isolated `uv tool` environment via install_coercion_tools.sh instead, avoiding dependency conflicts with the shared capability virtualenv. Each install is skipped when the tool is already present, and is non-fatal when `uv` is missing or the install fails. Updates the "not found in PATH" warnings in tools/certipy.py and tools/bloodyad.py to point at the new `uv tool install` commands. Bumps network-ops 3.0.1 -> 3.0.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Pre-merge review: the diff maps to the issue requirements and is limited to the five touched files. Container-level validation against the runtime sandbox image is still pending and should be run before this leaves draft. 🤖 Generated with Claude Code |
There was a problem hiding this comment.
🔵 Needs a closer look
Provisioning concerns remain unresolved, and required Docker acceptance checks still need verification by a reviewer with registry access.
2 open issues
What changed in this PR
Moves Certipy and bloodyAD into isolated tool environments to avoid dependency conflicts in the shared runtime.
Changes:
- Removes both shared Python dependencies and bumps network-ops to 3.0.2.
- Adds pinned, guarded, non-fatal installations through
uv tool. - Updates installation guidance and provisioning tests.
| File | Description |
|---|---|
| capabilities/network-ops/tools/certipy.py | Updates installation warning. |
| capabilities/network-ops/tools/bloodyad.py | Updates installation warning and docstring. |
| capabilities/network-ops/tests/test_provisioning.py | Checks dependency isolation, pins, and guards. |
| capabilities/network-ops/scripts/install_coercion_tools.sh | Adds isolated tool installations. |
| capabilities/network-ops/capability.yaml | Removes shared dependencies and bumps version. |
Review effort: Balanced
| # certipy-ad and bloodyAD are also installed by the script below, each into | ||
| # its own isolated `uv tool` environment, to avoid dependency conflicts with | ||
| # the shared python deps above. |
There was a problem hiding this comment.
Good catch — addressed in d914025. network-ops now declares $HOME/.local/bin in dependencies.path, mirroring web-security/capability.yaml, so the directory is appended to PATH for the preflight checks, MCP subprocesses, and the agent's shell tools (including off-platform under dreadnode serve, where the image PATH doesn't apply). This also covers the existing nxc install, which lands in the same directory.
| if command -v certipy >/dev/null 2>&1 || command -v certipy-ad >/dev/null 2>&1; then | ||
| echo "[*] certipy already present, skipping" |
There was a problem hiding this comment.
This case is a long-lived sandbox that already has the broken certipy-ad 4.8.2 on PATH. Remediating pre-existing broken copies is deliberately out of scope here — this change fixes fresh provisioning. The skip-if-present guard is also intended behavior: a runtime that already has a working tool should make no outbound install request.
On a fresh runtime there is no pre-existing certipy, so the guard triggers the isolated install as intended, and with $HOME/.local/bin now declared in dependencies.path the isolated executable is the one on PATH. Leaving the guard as-is.
…8935) The install script drops nxc, certipy, and bloodyAD into $HOME/.local/bin. Declare it in dependencies.path so the runtime adds it to PATH for preflight checks, MCP subprocesses, and the agent's shell tools — including off-platform under `dreadnode serve`, where the image PATH does not apply. Mirrors web-security. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Summary
network-opsdeclaredcertipy-adandbloodyADindependencies.python, which the SDK installs unconstrained into the shared runtime virtualenv. Their conflictingcryptographypins made the resolver backtrackcertipy-adto 4.8.2 — which fails to start (ModuleNotFoundError: pkg_resources) — and downgraded the shared venv'scryptographyto 44.0.2 (several CVEs; breaksjoserfc, which needscryptography >= 45).This moves both tools out of the shared venv into isolated
uv toolenvironments provisioned byinstall_coercion_tools.sh, so the shared venv keeps a currentcryptographyand both commands still resolve from$HOME/.local/bin.Changes
capability.yaml— dropcertipy-ad/bloodyADfromdependencies.python(keeploguru,impacket); bump version3.0.1→3.0.2.scripts/install_coercion_tools.sh— after thenxcblock, adduv tool install certipy-ad==5.1.0anduv tool install bloodyAD==2.5.5, eachcommand -v-guarded (skip + "already present, skipping") and non-fatal whenuvis missing or the install fails.tools/certipy.py,tools/bloodyad.py— "not found in PATH" warnings (and the bloodyAD docstring) now point to theuv tool install ...command instead ofpip install.tests/test_provisioning.py— assert the two packages are no longer independencies.python(whileloguru/impacketare, andnetexecstays out), and that the install script installs both viauv tool installbehind acommand -vguard.Validation
pytest capabilities/network-ops/tests -q→ 170 passed.just validate strict=true→ exit 0 (network-ops@3.0.2).Container-level validation against the runtime sandbox image is still pending and should be run before this leaves draft.
🤖 Generated with Claude Code