ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)
Go aiai-agentsautonomous-agentsbug-bountydockergolanglinuxllmmcpnextjspenetration-testingpentestpostgresqlreareactred-teamsecuritysecurity-automationsqlitetypescript
merge origin/main into hardening/pin-base-images
BaaRai39ae25623980
diff --cc Dockerfileindex f7db0d8,749e64d..d9fabf4--- a/Dockerfile+++ b/Dockerfile@@@ -13,7 -13,8 +13,8 @@@# ---------------------------------------------------------------- frontend ---# Pinned to the Node 22 line the CI/release workflows use. On the build platform# only; the frontend static export is architecture-independent.-FROM --platform=$BUILDPLATFORM node:22-bookworm-slim AS web+FROM --platform=$BUILDPLATFORM node:22-bookworm-slim@sha256:e9f565d32859f0cbfb52125eafe8be39390f24dac302dc3cdf566e8ba3ab21ee AS web+ ENV NEXT_TELEMETRY_DISABLED=1WORKDIR /src/webCOPY web/package.json web/package-lock.json ./RUN npm ci --ignore-scripts@@@ -21,10 -22,11 +22,11 @@@ COPY web/ .RUN npm run build:static# ------------------------------------------------------------- Go binary ---- # Pinned to the Go 1.26 line (matches go.mod and the release binaries job). The- # binary is CGO-free, so this stage runs on the build platform and cross-compiles- # to $TARGETARCH without QEMU.- FROM --platform=$BUILDPLATFORM golang:1.26-bookworm@sha256:dc40a13b61304647ed7e5d581d246b86413dfc29d63c6d018310feb93cd98fc0 AS build+ # Pinned to the exact Go release go.mod requires. The official image sets+ # GOTOOLCHAIN=local, so a floating 1.26 tag that lags go.mod fails the build;+ # bump this together with the go line in go.mod. The binary is CGO-free, so this+ # stage runs on the build platform and cross-compiles to $TARGETARCH without QEMU.-FROM --platform=$BUILDPLATFORM golang:1.26.11-bookworm AS build++FROM --platform=$BUILDPLATFORM golang:1.26.11-bookworm@sha256:dc40a13b61304647ed7e5d581d246b86413dfc29d63c6d018310feb93cd98fc0 AS buildWORKDIR /srcCOPY go.mod go.sum ./RUN go mod download@@@ -47,19 -49,44 +49,44 @@@ RUN ARTEX_SKIP_FRONTEND=1# Web-recon toolbox (drost-community take 1, #100): pinned release binaries, staged# on the build platform and copied into /usr/local/bin of the runtime image so hunt# workers can run them directly through their Bash tool. Versions pinned per tool;- # upgrade deliberately. Each archive is verified against the checksums file of its- # own GitHub release (exact asset name, sha256). That file comes from the same- # release channel as the archive, so it catches corrupted or swapped downloads and- # moved tags, not a compromised publisher. sqlmap has no release binaries: it is a- # shallow clone of a pinned tag, checked against the expected commit.+ # upgrade deliberately.+ #+ # Every archive is verified against a SHA-256 written down here, per asset and per+ # architecture, not against the *_checksums.txt of its own GitHub release. Checking+ # against that file catches a corrupted or swapped download and a moved tag, but the+ # digest and the artifact it describes come from the same publisher and the same+ # release: a replacement asset and a replacement checksums file agree with each+ # other and the build passes. Pinning the digest here moves that decision out of the+ # build, so a swapped asset fails unless the diff that swaps it also changes the+ # digest a reviewer reads.+ #+ # Cost: a version bump is now three edits (the version ARG and the two digests), and+ # a publisher re-uploading an asset under the same tag breaks the build until the+ # digest is bumped on purpose. That is the trade: the build stops trusting the+ # channel it downloads from.+ #+ # sqlmap has no release binaries: it is a shallow clone of a pinned tag, checked+ # against the expected commit, which is the same idea.-FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS tools+FROM --platform=$BUILDPLATFORM debian:bookworm-slim@sha256:734a72b3d6142a71993b4bc580ca01d8ca687f77a2c422d96a961d3376b179bc AS toolsARG TARGETARCHARG NUCLEI_VERSION=v3.11.1+ ARG NUCLEI_SHA256_AMD64=ea63d4ae232808cd7c6bc00d0142428e231fab59dae01042246097d195835ab6+ ARG NUCLEI_SHA256_ARM64=8044e3d9768ba0a744b2872c1a87e813006f013da97ca9f50f7661a4203bec07ARG HTTPX_VERSION=v1.12.0+ ARG HTTPX_SHA256_AMD64=9d8439e8b6c9aa7d1e2314817a392e00d5178da3af5652f7475f88868f418f76+ ARG HTTPX_SHA256_ARM64=fd7b123c1dfbc3d69f19f524e4eebcd6ec06b9a6cbd56813c76f11645197331eARG SUBFINDER_VERSION=v2.17.0+ ARG SUBFINDER_SHA256_AMD64=a39c3e5c7a26ef3c430915c4d6cbf7716a00f26769a75e9405aba796142eba37+ ARG SUBFINDER_SHA256_ARM64=24913d49dddc1d3a5e99a4a7580da5be980959b9415b96f52c4f7f4124392190ARG KATANA_VERSION=v1.8.0+ ARG KATANA_SHA256_AMD64=cb027ae99d0757061b70c07a15c7a80f62c5a535ab52c4a329f80c4b0a7309d2+ ARG KATANA_SHA256_ARM64=80e269210727a855511ffac8dfb01297b2344742acec71a35e8ba4a67a90f0f2ARG FFUF_VERSION=v2.3.0+ ARG FFUF_SHA256_AMD64=b2a3c725fcb9da175159682f54d6e9149f2905b00d84d155e7efc5d599975ceb+ ARG FFUF_SHA256_ARM64=e2d712615d53da797ee929006e41f2df5a7960a5353133db9c150ddaa22ae4e8ARG DALFOX_VERSION=v3.2.4+ ARG DALFOX_SHA256_AMD64=c11cfd2f8261973f0a2a2a1eba5a147ce77712a29acfa6343f9847fb8bb7eca2+ ARG DALFOX_SHA256_ARM64=fd56b0b7da2d06868cd73b504f41d21314629feffcd5bdc97718db1c9dd2fa70ARG SQLMAP_VERSION=1.9.9ARG SQLMAP_COMMIT=cceda39208b5aad478de2c3f731df4239d9881f6RUN apt-get update && apt-get install -y --no-install-recommends \@@@ -102,8 -133,32 +133,32 @@@ RUN set -eux;if [ "$commit" != "$SQLMAP_COMMIT" ]; then echo "sqlmap commit mismatch: want $SQLMAP_COMMIT got $commit" >&2; exit 1; fi; \rm -rf /opt/sqlmap/.git+ # -------------------------------------------------------- nuclei templates ---+ # nuclei ships no templates in the binary: on first run it clones+ # projectdiscovery/nuclei-templates into $HOME/nuclei-templates. Where the process+ # cannot reach github.com that install fails softly — it logs "nuclei-templates are+ # not installed, installing...", then "no templates found in path", and exits 0, so a+ # scan starts with an empty template set and looks like a broken tool. That is the+ # normal case behind an egress allowlist, and the case for every agent-run scan: the+ # executor's HOME is /app/data/exec-home, not the root-owned home the image is+ # built with. Bake the set at a fixed path instead, and point nuclei at it with+ # NUCLEI_TEMPLATES_DIR in the runtime stage, so the lookup does not depend on HOME or+ # on which user the process runs as. Tag and commit are both pinned and asserted: a+ # moved tag fails the build rather than silently changing the template set.+ ARG NUCLEI_TEMPLATES_VERSION=v10.5.1+ ARG NUCLEI_TEMPLATES_COMMIT=79fb682760ab3d5b0e22afbb44709353cbebf023+ RUN set -eux; \+ git clone --quiet --depth 1 --branch "$NUCLEI_TEMPLATES_VERSION" \+ https://github.com/projectdiscovery/nuclei-templates /opt/nuclei-templates; \+ commit="$(git -C /opt/nuclei-templates rev-parse HEAD)"; \+ if [ "$commit" != "$NUCLEI_TEMPLATES_COMMIT" ]; then echo "nuclei-templates commit mismatch: want $NUCLEI_TEMPLATES_COMMIT got $commit" >&2; exit 1; fi; \+ rm -rf /opt/nuclei-templates/.git; \+ count="$(find /opt/nuclei-templates -name '*.yaml' | wc -l)"; \+ echo "baked nuclei templates: $count"; \+ test "$count" -gt 10000+# ---------------------------------------------------------------- runtime ----FROM python:3.12-slim-bookworm+FROM python:3.12-slim-bookworm@sha256:935c3c5b12357a7e10caa9c1e6ca5692344d97cf229832ef584be2cec9fc03dfARG TARGETARCH# Common tools: ripgrep / curl / vim, plus a set of recon staples (add/remove as needed).RUN apt-get update && apt-get install -y --no-install-recommends \diff --cc docker-compose.ymlindex 042aab5,be89a5d..4ef1548--- a/docker-compose.yml+++ b/docker-compose.yml@@@ -1,6 -1,6 +1,6 @@@services:postgres:- image: postgres:16-alpine@sha256:1d5b02d3a9941fbd52437db4107f8c52d6297dac553ca1e5c299ebb3756b4857- image: postgres:16-alpine++ image: postgres:16-alpine@sha256:f2f98726820d0342055351c6e9d36e705f5bfffb3dd53ff556325114b08afb6denvironment:POSTGRES_USER: ${POSTGRES_USER:-artex}POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Please set POSTGRES_PASSWORD in .env}