Stack (DEP-91)
Split from #1662 for reviewability, then rescoped: main has since landed #1681 (dependency/toolchain CVEs) and #1693 (hoophq/hoopagent), which superseded two PRs of the original stack.
-
#1683 — Go dependency + toolchain CVE bumps— closed, superseded by #1681 -
#1685 — opt-in— closed, superseded by #1693hoophq/hoopdev-minimal -
#1684 — 1. agent-tools: drop kernel-header CVEs, modernize clean train ← you are here
-
#1686 — 2. Vulnerability gates for hoopagent + govulncheck
-
#1687 — 3. SBOM + bundled-tool manifest on releases
-
#1688 — 4. Weekly base-OS rebuild of hoopagent
-
#1689 — 5. Image release integrity hardening
Merge in order, bottom-up. Each PR targets the one below it.
The remaining work is what main still lacks: the fat image's kernel-header CVEs, and any vulnerability gate, SBOM, or scheduled OS patching for hoophq/hoopagent.
What
Removes build-only packages from the agent-tools base image (the base of hoophq/hoopdev) and modernizes the clean train.
- Drops
alien,elfutils,libelf-dev,python3-dev— they pulled inlinux-libc-dev(kernel headers, ~891 findings) andlibc6-devwith no runtime use. - Installs
groffandpython3-pipwith--no-install-recommends. - Declares
xz-utilsexplicitly (previously transitive via the removed packages). - Uses runtime
unixodbcinstead of-devheaders. - Makes
KUBECTL/SQLCMD/MONGOSH/MONGODB_TOOLSversions ARG-driven so the legacy and clean trains can diverge.
Why
Kernel headers were the single largest CVE contributor in the fat image and were never needed at runtime — every bundled CLI is prebuilt.
hoophq/hoopagent (#1693) does not help here: hoophq/hoopdev is a separate image that many deployments still need for exec-based connections and RDP, and main still installs all four packages.
Risk
Legacy-train pins are unchanged, so hoophq/hoopdev keeps its current tool versions. The workflow asserts train contents (legacy keeps the legacy mongo shell; clean ships only mongosh).
How to test
docker build -f Dockerfile.tools -t agent-tools-test .
docker run --rm agent-tools-test sh -c 'dpkg -l | grep -c linux-libc-dev || echo "0 (expected)"'
docker run --rm agent-tools-test sh -c 'psql --version && mongosh --version && kubectl version --client && aws --version'Expected: no linux-libc-dev; every bundled client still works.
Part of DEP-91.
Automated by MisterMal
Activity
11Code Review by Qodo
🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)
1. Headers removed break derived builds ✓ Resolved 🔗 Cross-repo conflict ☼ Reliability
Description
This PR drops build headers (python3-dev, unixodbc-dev) from hoophq/agent-tools, which is the base image for hoophq/hoopdev; hoophq/infra’s hoopdev-dck Dockerfile installs native Python deps (e.g., pyodbc, pymssql) and may fail to build when infra upgrades its pinned hoopdev tag if any dependency falls back to an sdist build (especially on non-amd64). Coordinate with infra to add explicit build deps there or guarantee wheels-only installs.
Code
+ # DEP-91: runtime unixodbc (libodbc2 + isql), not the -dev headers which + # pull linux-libc-dev. Same source version; ODBC runtime preserved. + unixodbc=2.3.12-1ubuntu0.24.04.1 \
Evidence
PR repo shows hoopdev is built FROM agent-tools and that agent-tools no longer includes python3-dev and unixodbc-dev; infra repo shows a derived image that pip-installs native-extension packages which may require those headers if wheels aren’t available.
Dockerfile.dev[1-7]Dockerfile.tools[26-64]Dockerfile.tools[163-176]External repo: hoophq/infra, dock/Dockerfile [1-55]
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution ### Issue description `hoophq/infra` builds `hoophq/hoopdev-dck` FROM `hoophq/hoopdev`, and `hoophq/hoopdev` is built FROM `hoophq/agent-tools`. This PR removes `python3-dev` and switches from `unixodbc-dev` to `unixodbc` in `agent-tools` (intentionally, to drop kernel headers CVEs). If infra’s `pip3.12 install ... pyodbc/pymssql/...` ever falls back to source builds (wheel gaps, platform differences), the build can fail due to missing Python/ODBC headers. ### Issue Context - The infra Docker build currently pins `FROM hoophq/hoopdev:1.54.0`; it won’t break immediately, but it can break on the next bump to a hoopdev version built on the new `agent-tools` base. - This is most likely to surface on architectures where wheels are missing or if dependency versions change. ### Fix Focus Areas - Dockerfile.tools[26-64] - Dockerfile.tools[163-176] - Dockerfile.dev[1-7] - /cross_repos/infra/dock/Dockerfile[1-55] ### Suggested remediation options 1) In **hoophq/infra** `dock/Dockerfile`, add explicit build deps for the pip layer (only if needed): `python3-dev`, `build-essential`, and `unixodbc-dev` (or pin/ensure wheel-only installs). 2) Alternatively, keep `agent-tools` slim but document this as a breaking contract for downstream images and add a CI build of infra’s Dockerfile against a hoopdev tag built from the new base (coordination/test gate).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Context
39 rules✅ Cross-repo context
repo: hoophq/infra (sha: 801e2c0a)hoophq/libhoophoophq/documentationhoophq/changelogTip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PRMore tips ↗ | Customize Qodo ↗ | Qodo docs ↗
Migration Safety Analysis
No database migrations were changed in this PR. Safe to deploy to sandbox.
Migration Safety Analysis
:warning: Automated analysis unavailable -- the LLM API call failed. Please review these migration files manually:
gateway/migrations/000107_access_request_rules_skip_review_groups.down.sql
gateway/migrations/000107_access_request_rules_skip_review_groups.up.sqlCheck for:
- Destructive operations (DROP TABLE, DROP COLUMN, TRUNCATE)
- Missing or noop .down.sql files
- Rollback safety for sandbox deployments
Automated analysis by Migration Safety Check.
📋 API Changelog
API Changelog unknown vs. unknown
API Changes
GET /access-requests/rules
- :warning: added the new
jit_commandenum value to thedata/items/access_typeresponse property for the response status200 - added the optional property
data/items/skip_review_groupsto the response with the200status
POST /access-requests/rules
- :warning: added the new
jit_commandenum value to theaccess_typeresponse property for the response status201 - added the new optional request property
skip_review_groups - added the new
jit_commandenum value to the request propertyaccess_type - added the optional property
skip_review_groupsto the response with the201status
GET /access-requests/rules/{name}
- :warning: added the new
jit_commandenum value to theaccess_typeresponse property for the response status200 - added the optional property
skip_review_groupsto the response with the200status
PUT /access-requests/rules/{name}
- :warning: added the new
jit_commandenum value to theaccess_typeresponse property for the response status200 - added the new optional request property
skip_review_groups - added the new
jit_commandenum value to the request propertyaccess_type - added the optional property
skip_review_groupsto the response with the200status
GET /connection-credentials
- endpoint added
✅ Build Completed with Success, Version=1684.0.0-g48d32b1
✅ Build Completed with Success, Version=1684.0.0-g48d32b1
✅ Build Completed with Success, Version=1684.0.0-g0473ea4
PR Summary by Qodo
agent-tools: remove kernel-header deps and centralize clean-train versions
✨ Enhancement⚙️ Configuration changes🕐 40+ MinutesAI Description
Diagram
High-Level Assessment
1. Move clean-train version pins to a repo file (e.g., versions.env)
2. Adopt docker-bake with named targets for legacy/clean
Files changed (2)
+64 / -40Other (2)
+64 / -40agent-tools-build.yml
Centralize clean-train build args and smoke-build arm64 on PRs+26/-12Dockerfile.tools
Drop kernel-header-inducing packages and make key tool pins ARG-driven+38/-28