Skip to content

build: update base images, dependencies, and security patches for faster and safer builds#225

Merged
l50 merged 6 commits into
mainfrom
feat/container-image-hardening
Apr 21, 2026
Merged

build: update base images, dependencies, and security patches for faster and safer builds#225
l50 merged 6 commits into
mainfrom
feat/container-image-hardening

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Apr 21, 2026

Key Changes:

  • Updated all Warpgate container templates to use immutable, pinned base image digests
  • Added dev-deploy Rust profile for faster iterative builds with optimized defaults
  • Upgraded major Rust, Python, and Ruby dependencies for security and performance
  • Applied additional package and pip/gem upgrades to address recent CVEs in build and runtime

Added:

  • Introduced [profile.dev-deploy] section in Cargo.toml for rapid Rust builds,
    enabling faster compile times and incremental builds suitable for development
  • Task for upgrading pip to the latest version in Ansible base role to address
    CVEs and ensure the newest Python package installer is present
  • Task to update vulnerable Ruby gem dependencies (net-imap, resolv, rexml,
    uri, zlib) in lateral movement tooling to mitigate recent vulnerabilities
  • Task to upgrade pycryptodome in the Impacket virtual environment to fix
    CVE GHSA-j225-cvw7-qrx7 in credential access tools role

Changed:

  • All container images in Warpgate templates now reference SHA256 digests for
    deterministic builds, improved reproducibility, and security
  • Warpgate provisioners for blue agent templates now pin mcp-grafana download
    URLs to explicit version (v0.11.6) instead of latest for consistency
  • Updated Ansible Molecule scenarios to use Ubuntu 24.04 images, ensuring
    compatibility with newer base systems
  • Updated key Python dependencies (aiohttp, cryptography, requests) to
    secure minimum versions in the base role
  • Bumped specific Python package versions (e.g., cryptography, pyopenssl)
    in coercion tools for improved security and compatibility
  • Updated Rust dependencies in Cargo.lock to latest patch versions for
    aws-lc-rs, aws-lc-sys, bitflags, cc, hashbrown, hyper-rustls,
    indexmap, itertools, js-sys, libc, libredox, rand, redox_syscall,
    rustls, rustls-webpki, tokio, typenum, wasip2, wasm-bindgen*,
    webpki-root-certs, windows-sys, and related Windows target crates
  • Cross build config (Cross.toml) now installs mold linker for faster
    linking, improving Rust build times in CI and local development
  • Rust EC2 build Taskfile now supports fast profile switching, parallel jobs,
    and auto-stripping for deploys; prefers dev-deploy profile for development
  • Refined build logic to use all available CPU cores by default for Rust
    compilation, improving speed for both local and remote builds
  • Coercion tools now require minimum versions for cryptography and pyopenssl

Removed:

  • No longer reference floating container tags (e.g., latest) in any build or
    deployment context—ensuring all images are immutable and auditable
  • Eliminated redundant or obsolete comments in build scripts to clarify logic

l50 added 5 commits April 20, 2026 15:51
…for security

**Added:**

- Added `aiohttp>=3.13.4` and `cryptography>=44.0.1` to base Python pip packages
  for all agents in Ansible role defaults and documentation
- Added task to upgrade `pycryptodome` in the impacket virtualenv to `>=3.19.1`
  as a CVE fix (GHSA-j225-cvw7-qrx7) in credential access tools

**Changed:**

- Updated multiple dependencies in `Cargo.lock` to newer versions for security
  and compatibility, including but not limited to:
    - `cryptography` bumped from `>=42.0.0` to `>=44.0.1`
    - `pyopenssl` bumped from `>=24` to `>=26.0.0`
    - Various Rust crates including `aws-lc-rs`, `aws-lc-sys`, `bitflags`,
      `cc`, `hashbrown`, `hyper-rustls`, `indexmap`, `itertools`, `js-sys`,
      `libc`, `libredox`, `rand`, `redox_syscall`, `rustls`, `rustls-webpki`,
      `tokio`, `typenum`, `wasip2`, `wasm-bindgen`, `web-sys`,
      `webpki-root-certs`, and several `windows-*` crates
    - Updated dependency hashes to match the new versions
- Updated Ansible role documentation to reflect new pip package requirements
- Updated package installation and upgrade commands in the GPU cracker base
  image provisioner to include `apt-get upgrade -y` for improved security
- Updated all Warpgate agent templates to pin Docker base images by digest
  (`@sha256:`) for reproducibility and supply chain security
- Updated Kali Linux and NVIDIA CUDA base image references in agent templates to
  use pinned digests

**Removed:**

- Removed redundant or outdated references to previous dependency versions and
  image tags in templates and lock files
…ates

**Changed:**

- Updated mcp-grafana installation in all agent templates to download a specific
  release (v0.11.6) instead of using the 'latest' tag, ensuring consistent and
  reproducible builds across x86_64 and arm64 architectures
**Changed:**

- Updated all Molecule scenario configurations to use the
  `geerlingguy/docker-ubuntu2404-ansible:latest` image for consistency with
  latest LTS Ubuntu release and to ensure up-to-date test environments
- Modified pip upgrade task in base role to use `ansible.builtin.command`
  instead of `ansible.builtin.pip` for improved compatibility with newer pip
  versions and to address issues with system-managed Python environments
- Adjusted pip install extra arguments to use `--ignore-installed` for all
  Debian-family distributions instead of only Kali or when break-system-packages
  is required, improving reliability across supported platforms
- Updated base role README to reflect the use of `command` for pip upgrades
  instead of the deprecated `pip` module for this operation
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/templates Changes made to warpgate template configurations label Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.06%. Comparing base (f337b6a) to head (ab54fda).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   51.05%   51.06%   +0.01%     
==========================================
  Files         374      374              
  Lines       56688    56705      +17     
==========================================
+ Hits        28941    28958      +17     
  Misses      27747    27747              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

docs: clarify operation completion modes and forest root requirements
**Added:**

- Documented the three orchestrator completion modes (default, stop on domain
  admin, stop on golden ticket) and how they interact in `docs/red.md`
- Added detailed explanation on why child domain domination does not satisfy
  forest root requirements in both `docs/red.md` and `config/ares.yaml`
- Introduced new test verifying that dominating a child domain does not cover
  the forest root, and a test for direct forest root domination

**Changed:**

- Updated orchestrator logic to only consider a forest root dominated if that
  specific root domain is compromised, not just a child domain -
  `completion.rs`
- Improved comments in `completion.rs` explaining the forest root dominance
  rule and its security rationale
- Enhanced configuration comments in `ares.yaml` to clarify mutual exclusivity
  and behavior of completion flags, with usage examples and documentation
  references
- Revised existing test to clarify intent and renamed it for accuracy regarding
  forest root domination semantics

**Removed:**

- Removed ambiguous comments in `ares.yaml` related to previous completion
  logic, consolidating all behavior under new clarified documentation
```
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/docs Changes made to project documentation label Apr 21, 2026
@l50 l50 merged commit f9fb1e4 into main Apr 21, 2026
31 checks passed
@l50 l50 deleted the feat/container-image-hardening branch April 21, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes made to project documentation area/templates Changes made to warpgate template configurations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant