Skip to content

build(docker): preinstall pinned python dependencies for agent scripts - #504

Merged
BaaRai merged 2 commits into
BaaRai:mainfrom
rheatkhs:docker-pinned-python-deps
Nov 26, 2026
Merged

BaaRai merged 2 commits into
BaaRai:mainfrom
rheatkhs:docker-pinned-python-deps

Conversation

@rheatkhs

@rheatkhs rheatkhs commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Agent workers frequently generate and execute custom Python scripts during assessments (HTTP interaction, parsing, data transformation, etc.). In air-gapped environments or deployments using strict egress restrictions, runtime pip install commands fail or trigger unexpected egress alerts. Furthermore, previous review on #393 noted that having common Python modules preinstalled is reasonable as long as packages are pinned to exact versions and avoid large unvetted wordlists.

Change

Preinstall common utility packages required by agent-written scripts into the runtime container image:

  • requests==2.32.3
  • beautifulsoup4==4.12.3
  • lxml==5.3.0
  • urllib3==2.2.3
  • pyyaml==6.0.2
  • jinja2==3.1.4
  • colorama==0.4.6
  • tqdm==4.67.1

All selected package versions provide pre-built manylinux wheels for both amd64 and arm64 under Python 3.12, ensuring fast deterministic builds without requiring extra C compiler toolchains. SecLists is omitted. Added a corresponding entry to CHANGELOG.md.

Verification

  • Verified that all specified package versions provide wheels for Linux x86_64 and aarch64 on PyPI.
  • Validated git diff against current main to ensure formatting and existing stages remain untouched.

@5P34R

5P34R commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Review notes

Pinning is the right approach, and this supersedes #393. But several of the pinned versions are old and have published CVEs that were fixed in later releases:

Please bump these to current releases. Since the rest of the Dockerfile verifies everything by digest or SHA256, pip's --require-hashes with a small pinned requirements file would match that convention.

@BaaRai
BaaRai force-pushed the docker-pinned-python-deps branch from 89dd75d to 484d16a Compare November 26, 2026 22:24
BaaRai added a commit to Coff0xc/ARTEX-contrib that referenced this pull request Nov 26, 2026
@BaaRai
BaaRai force-pushed the docker-pinned-python-deps branch from 484d16a to 3df80a2 Compare November 26, 2026 22:40
BaaRai added a commit to Coff0xc/ARTEX-contrib that referenced this pull request Nov 26, 2026
@BaaRai
BaaRai force-pushed the docker-pinned-python-deps branch from 3df80a2 to 78c2cbc Compare November 26, 2026 22:56
BaaRai added a commit to Coff0xc/ARTEX-contrib that referenced this pull request Nov 26, 2026
@BaaRai
BaaRai force-pushed the docker-pinned-python-deps branch from 78c2cbc to cc28d89 Compare November 26, 2026 23:13
@BaaRai
BaaRai merged commit 09dbae5 into BaaRai:main Nov 26, 2026
6 checks passed
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.

3 participants