Repository navigation
build(sandbox): pin Go tool releases and gate heavy optional layers - #1136
Merged
Merged
Conversation
added 2 commits
October 28, 2026 12:57
subfinder/httpx-toolkit/katana/nuclei/naabu/gobuster move from kali-rolling apt to a pinned GitHub-release fetch stage that verifies each binary against the release checksums.txt and COPYs one tool per layer, so a single-tool bump no longer re-pushes the whole tool layer on every release and engagement evidence stops drifting with kali-rolling. Chromium (~1 GB) moves behind INSTALL_BROWSER and the Exploit-DB corpus (~290 MB) behind INSTALL_EXPLOITDB — both default true so release images are unchanged; lean CI/release-verify builds opt out via the compose sandbox build args. Non-English locales are stripped inside the tool-install layer. make clean-dev-images removes the :dev-tagged images and dangling layers release-verify cycles park on disk. Verified with INSTALL_BROWSER=false INSTALL_EXPLOITDB=false docker build: 5.36 GB -> 3.48 GB; all six tools report their pinned versions; tmux/nmap/python deps healthy.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1 of 3 tasks
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
Locally built
:devimages and rolling-version apt layers made the sandbox the dominant disk/push cost of the project: a locally built:devsandbox shares almost no layers with its GHCR release twin (~10 GB parked per release-verify cycle), and kali-rolling re-resolves package versions on every build so the 2.4 GB tool layer was re-pushed to GHCR in full on every release even with no tool bump. This PR pins the Go recon toolchain to GitHub releases (checksum-verified, one layer per tool), moves Chromium and the Exploit-DB corpus behind opt-out build ARGs (defaults unchanged for release images), strips non-English locales in the installing layer, and addsmake clean-dev-imagesfor the release-verify lifecycle. With both flags off, the sandbox builds at 3.48 GB vs 5.36 GB (-35%).Changes
containers/sandbox.Dockerfile: newgo-toolsfetch stage — subfinder, httpx(-toolkit), katana, nuclei, naabu, gobuster fetched as pinned release binaries (ARGs at top), each verified against the project'schecksums.txt(naming is inconsistent per project — katana dashes, naabu drops the version, gobuster omits it from the archive name — so the checksum filename is passed explicitly per tool); arch-aware for the multi-arch amd64/arm64 build viaTARGETARCH. Final stage COPYs one tool per layer, so a single-tool bump re-pushes only that tool.httpxis installed ashttpx-toolkitto keep the kali package name operators invoke.INSTALL_BROWSERARG (defaulttrue): Chromium (~1 GB) opt-out. With the binary absent,INSANE_CHROMIUM_PATHstill points at the missing path so a stray browser-tier call fails immediately with a missing-executable error instead of falling back to a Playwright Chrome download inside the sandbox.INSTALL_EXPLOITDBARG (defaulttrue): Exploit-DB corpus (~290 MB) opt-out, in its own layer. A shared-volume variant (one corpus volume for N sandboxes) would save the same MBs for release images too, but needs a decision on first-run population versus the sandbox egress allowlist lifecycle — deliberately not wired here.docker-compose.yml:sandboxbuild args passINSTALL_BROWSER/INSTALL_EXPLOITDBthrough, soINSTALL_BROWSER=false INSTALL_EXPLOITDB=false docker compose build sandboxandINSTALL_BROWSER=false ... make smokeopt out.Makefile:clean-dev-imagestarget — removes:dev-tagged decepticon images and dangling layers;docker rmiskips images still in use, so it is safe while a stack is up.CHAGELOG.md: Unreleased (proposed) entry.Intent
docs/adr/0010-open-web-acquisition.mdbehavior is untouched — release image defaults are byte-identical apart from stripped locales).Blast radius
If ticked, paste a Why this touches a supply-chain surface paragraph below, and confirm the PR changes that surface and nothing else:
Why this touches a supply-chain surface: the PR edits
containers/sandbox.Dockerfile(the shipped sandbox image recipe),docker-compose.yml(the shipped compose contract) — every OSS user builds/pulls from these on the next release. Two new build ARGs default totrue, so release image contents are unchanged apart from stripped non-English locales and the six Go tools now coming from checksum-verified GitHub releases instead of the kali apt mirror. Nothing outsidecontainers/sandbox.Dockerfile,docker-compose.yml,Makefile,CHAGELOG.mdis touched.Diff budget
CHAGELOG.mdis docs-excluded; the Dockerfile diff is majority comment.)End-to-end verification
Built the sandbox from this branch with
docker build -f containers/sandbox.Dockerfile --build-arg INSTALL_BROWSER=false --build-arg INSTALL_EXPLOITDB=false -t decepticon-sandbox:lean-test2 .— completed successfully;docker imagesreports 3.48 GB vs 5.36 GB for the current 2.2.0 release image. Inside the built image (docker run --rm --network none --entrypoint /bin/sh decepticon-sandbox:lean-test2 -c ...):subfinder -version→ v2.17.0,httpx-toolkit -version→ v1.12.0,katana -version→ v1.8.0,nuclei -version→ v3.11.1,naabu -version→ 2.6.1,gobusterhelp shows VERSION section;searchsploitandchromiumabsent as intended;tmux -V(the image healthcheck) → 3.7c;nmap --version→ 7.991;python3 -c "import fastapi, curl_cffi"OK;/usr/share/locale82 MB → 764 KB. An earlier lean build (browser flag only, exploitdb still bundled, tools still from apt) also completed at 3.84 GB with all apt-installed tools present, confirming the flag gating works on both paths.docker build --check -f containers/sandbox.Dockerfile .→ "Check complete, no warnings found";docker compose config --quietpasses with and without the flags set (with a throwaway.env, since the repo ships.env.example).Testing
make qualitypasses (Python + CLI + Web) — not run: no Python/CLI/Web code changed (Dockerfile, compose, Makefile, changelog only)make smokesucceeds (clean local build + OSS-style up + health checks) — not run in full; the sandbox image build + entrypoint/healthcheck dependency (tmux) was verified directly as described abovepytest tests/passes — not run: no Python changeddocker build --check,docker compose config)Quality Bar self-check
Related Issues
None — build-maintenance follow-up; no open issue tracks this.