Repository navigation
Conversation
The step-ca images are built on smallstep/step-cli, which is only rebuilt when the CLI is released. Packages patched in Alpine or Debian since then were shipped unpatched, and they account for most of the findings that scanners report against the published images. Upgrade them in the runtime stage, the same way the step-cli Dockerfiles already do. Bump github.com/jackc/pgx/v5 from v5.9.2 to v5.12.0, which fixes GHSA-j38q-h3ph-jjpq (SQL injection in simple-protocol batches) and GHSA-95fj-3fxw-g62g (require_auth / channel_binding bypass, affecting v5.9.0 through v5.11.0).
This was referenced Nov 12, 2026
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.
Name of feature:
Not really a feature - this is a vulnerability cleanup for the step-ca Docker images. Nothing changes in how the image works.
Pain or issue this feature alleviates:
Hey folks! We scan everything we pull with JFrog Xray, and
smallstep/step-ca:0.30.2came back with 231 findings (36 critical, 112 high). None of it is in your code. I dug in to figure out where it was actually coming from, and it turned out to be mostly an image freshness problem, not a code problem:FROM smallstep/step-cli:latest, and that image only gets rebuilt when the CLI ships. Anything Alpine patched since then rides along unpatched. The step-cli Dockerfile already runsapk upgrade, but step-ca doesn't, so it inherits whatever was stale.golang:alpine, so a rebuild picks up current Go on its own. Nothing to change there.pgx, probably because it's indirect.So this PR does two small things:
apk upgrade --no-cachein the runtime stage ofdocker/Dockerfile(andapt-get upgrade -yinDockerfile.hsm), same as the step-cli Dockerfiles already do.github.com/jackc/pgx/v5from v5.9.2 to v5.12.0. That fixes GHSA-j38q-h3ph-jjpq (SQL injection in simple-protocol batches) and GHSA-95fj-3fxw-g62g (arequire_auth/channel_bindingbypass that hits 5.9.0 through 5.11.0). I went with 5.12.0 instead of 5.13.0 on purpose - 5.13 changes how client certs get loaded, and that felt like something you'd want to look at on its own.Why is this important to the project (if not answered above):
Here's where things land with this branch, built on top of the matching cli and step-kms-plugin branches:
For the Xray row I took every finding in the export and checked it against what's actually installed in the rebuilt image, using Xray's own affected-version ranges. 227 of the 231 clear. 9 of those are only gone because you already moved to go-jose v4 in
cddde30a- credit where it's due. The 4 that are left are scanner data issues:prometheus/common, but it's actually a Prometheus server bug. No version of the library will ever clear it.Two things I left alone on purpose:
x/crypto/openpgpdeprecation notice (GO-2026-5932). It's the 3 Trivy hits above, once per binary. Nothing importsopenpgp, and govulncheck agrees it's never called. The only "fix" is x/crypto v0.59.0, but that release drops DSA fromx/crypto/sshand rejects SSH certs with no principals.step ssh fingerprinton anssh-dsskey works today and breaks on 0.59.0, and 21 tests acrossauthorityandauthority/provisionerfail because two test fixtures sign certs without principals. That's your call to make, not mine to sneak into a "security fixes" PR. Dependabot will bring it to you anyway.The part I think matters most: release order. This image copies
stepfromstep-cli:latestandstep-kms-pluginfromstep-kms-plugin:cloud. If step-ca goes out at the end of November before those two release, I measured 82 of the Xray findings still being in there (10 critical, 40 high), all in those two binaries. For a clean image the order would be:Is there documentation on how to use this feature? If so, where?
N/A - nothing user-facing changes. Same entrypoint, CMD, healthcheck,
stepuser (uid 1000), volumes, packages and platforms.In what environments or workflows is this feature supported?
I didn't want to break prod for anyone, so I tested it pretty hard against the published 0.30.2 as a baseline:
DOCKER_STEPCA_INIT_*(with ACME and SSH): goes healthy, prints the admin password once, shreds it, creates the same provisionersstep ca certificate, andstep ca health:443as the non-rootstepuser (so the file capability survives)step kmsthrough the bundled pluginpostgres:17: same 24 tables, issue and revoke both land in the DB-hsmimage, same checks, withpcscdstarting from the entrypointI also ran your CI locally on Go 1.26 and 1.27: golangci-lint with your shared config, the
go generateandgo mod tidychecks, govulncheck,make test(including the TPM simulator tests),make build, and CodeQL with the security-and-quality suite. Everything passes, and CodeQL comes back with the exact same results as master.In what environments or workflows is this feature explicitly NOT supported (if any)?
Nothing new is unsupported. I couldn't build arm64 or arm/v7 locally, but the package and module versions are the same across architectures. The
-hsmimage still has about 470 Debian findings after the upgrade, but every one of them isaffectedorfix_deferredon Debian's side, so there's nothing to upgrade to yet.Supporting links/other PRs/issues:
Happy to adjust any of this - totally understand if you'd rather fold it into your own base image work.