Skip to content

Python-free launcher + robust Windows Docker detection - #8

Open
kendrixjw wants to merge 2 commits into
AKCodez:mainfrom
kendrixjw:feat/python-free-launcher
Open

Python-free launcher + robust Windows Docker detection#8
kendrixjw wants to merge 2 commits into
AKCodez:mainfrom
kendrixjw:feat/python-free-launcher

Conversation

@kendrixjw

Copy link
Copy Markdown

Summary

Makes the pentest skill turnkey on Windows hosts that have Docker but no Python (and hardens Docker detection generally). Previously, preflight required a host Python interpreter to run and misreported a working Docker Desktop as unavailable, leaving the skill blocked on an otherwise capable machine.

Changes

  • scripts/ht.sh (new) — Python-free launcher. Runs the ht_*.py scripts with the host's Python when a real interpreter is present (rejects the Windows Store execution-alias stub by actually executing it). When none exists, it bootstraps them inside a small cached container (Python + Docker CLI) with the host Docker socket mounted, so tool containers are still launched by the host daemon. Invoke any script as sh ht.sh <name> [args].
  • scripts/ht_env.py — probe the daemon with docker version instead of docker info (lighter, still daemon-confirming) and raise the timeout 5s→15s, fixing a Windows Docker Desktop false-negative that collapsed the backend to fallback. Added HT_FORCE_HOST / HT_FORCE_DOCKER overrides so detection stays correct when bootstrapped in a container.
  • scripts/ht_run.py — honor HT_HOST_CWD as the Docker volume source, so local-file tools (trufflehog, ffuf wordlists, …) still see host files under the container bootstrap (avoids the Docker-in-Docker path trap).
  • skills/pentest/SKILL.md — drive all scripts through sh ht.sh <name>.
  • .gitattributes (new) — pin *.sh to LF so the launcher isn't broken by a CRLF checkout on Windows.

Verification (Windows + Docker Desktop, no host Python)

  • sh ht.sh preflightverdict: ready, host: windows, backend: docker
  • sh ht.sh run … httpx -u example.comstatus: ok
  • sh ht.sh run … trufflehog filesystem /work → scanned a planted host file (proves HT_HOST_CWD delivers local files into tool containers)
  • sh ht.sh search --q nmap → clean JSON

Note

The bootstrap path mounts the host Docker socket into the launcher container — standard for this tooling, but worth calling out as host-level daemon access.

🤖 Generated with Claude Code

kendrixjw and others added 2 commits August 9, 2026 10:27
- ht.sh: run scripts via host Python, or bootstrap in a container
  (Python + Docker CLI, host socket mounted) when none is present
- ht_env.py: probe daemon with `docker version` (fixes Windows
  Docker Desktop false-negative); add HT_FORCE_HOST/HT_FORCE_DOCKER
- ht_run.py: honor HT_HOST_CWD so local-file tools work under the
  container bootstrap
- SKILL.md: drive all scripts through `sh ht.sh <name>`

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ht.sh runs under /bin/sh (including inside the bootstrap container);
a CRLF checkout on Windows would break the interpreter line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant