Repository navigation
Bootstrap zizmor without Docker - #169
Conversation
|
Actually - after thinking a bit - MAYBE it's better to use |
|
cc: @woodruffw ? |
547ed46 to
0d4535c
Compare
Kusari Analysis Results:
Dependency analysis found no pinned version dependency changes. Code analysis recommends PROCEED: the only HIGH finding (mutable action reference on line 25 of zizmor.yml) appears to be a false positive because the step is a local reference ('uses: $/'), which cannot be repointed by a third party, and the checkout step is already pinned to a full commit SHA. The urllib finding in sync-zizmor-versions.py is low risk because the URL is a hardcoded HTTPS constant to pypi.org with no user-controlled input. No secrets or workflow issues were reported. Combined, the risk profile is unchanged and low, so no action is required. Note View full detailed analysis result for more information on the output and the checks that were run.
Found this helpful? Give it a 👍 or 👎 reaction! |
0d4535c to
b7f8ee9
Compare
|
Kusari PR Analysis rerun based on - b7f8ee9 performed at: 2026-09-10T12:20:55Z - link to updated analysis |
b7f8ee9 to
f5b024d
Compare
Yeah. Implemented it. It looks way better - and keeps hashes in |
woodruffw
left a comment
There was a problem hiding this comment.
Hi @potiuk, thanks for opening a PR.
You picked a challenging one to work on 🙂 -- I've thought about this one a lot and have a lot of concerns about performance, security, and ergonomics that need solutions before we can switch off Docker here.
(These are my initial thoughts from mobile, I'll try and do a more detailed review tonight along with a dump of some of the locking ideas I had.)
|
OK. All fair. I will address them all :) |
|
Kusari PR Analysis rerun based on - 3159c3c performed at: 2026-09-10T14:49:49Z - link to updated analysis |
|
It seems that we can only do it with The way I proposed it seems to be working fine - brought back the bumping workflow, and I store all hashes in per-version file and depending on version those args are added to installation with |
Nice -- that's the approach I was thinking, glad you reached that too! |
|
Kusari PR Analysis rerun based on - f825d19 performed at: 2026-09-11T09:40:14Z - link to updated analysis |
|
Kusari PR Analysis rerun based on - 753ba0d performed at: 2026-09-11T09:41:15Z - link to updated analysis |
|
Thanks for great feedback @woodruffw -> I will Iterate on it later today. |
|
Kusari PR Analysis rerun based on - 48f62f5 performed at: 2026-09-13T10:59:47Z - link to updated analysis |
|
Pushed the review fixes. Two notes:
Everything else is verified locally against the real wheels from |
Docker was only ever the bootstrap mechanism, and it isn't available everywhere: ubuntu-slim ships the docker client without a daemon, so 'command -v docker' succeeds there and 'docker pull' then fails with a connection error. The action now installs uv and runs zizmor from it. uv resolves the wheel for the runner's architecture, so there is no architecture matching to maintain here. The default version moves into a uv.lock, which Dependabot keeps current via the new uv ecosystem entry. That replaces what support/versions did for the image, and covers more: the lock records a hash for every wheel on every platform, where the versions file recorded one amd64 image digest, and 'uv run --locked' refuses to re-resolve if the lock and pyproject.toml have drifted apart. The versions file, its sync script and the hourly sync workflow are therefore removed. The 'version' input gains 'locked' (the new default) alongside 'latest' and an exact X.Y.Z. An unknown version now fails as a uv resolution error rather than a versions-file lookup miss, so the existing xfail selftests still hold. ubuntu-slim is added to the selftest matrix, a selftest is added for 'version: latest', and the repository's own analysis workflow moves to ubuntu-slim as well. That job has to run the in-tree action rather than the pinned v0.6.3 release, since the release still requires Docker and so cannot run on ubuntu-slim. Generated-by: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01CiacQ5MSzv4x9oLPeZvYDL
Reworks the previous uv-based approach in response to review: - Install zizmor with the runner's own Python into a throwaway virtual environment under RUNNER_TEMP, instead of installing uv via setup-uv. setup-uv mutates global toolchain state and pulls in a heavy JS action, and the pyproject.toml it needed carried a `requires-python` floor that could have triggered a python-build-standalone download on runners with an older Python. Both are gone, along with uv.lock. zizmor's wheels ship a self-contained native executable, so the action copies that out and deletes the environment before running, and checks that assumption rather than trusting it. - Replace the container digests in `support/versions` with hash-pinned requirements files under `support/locks/`, one per release. Each pins every wheel of its version, so `pip --require-hashes` verifies whichever wheel matches the runner. This keeps the property that every version this action can run is pinned by hash, not merely by version. - Drop `version: latest`. Resolving it at run time makes the version of zizmor a workflow runs mutable; the Docker path never did this, because `latest` was resolved to a digest recorded at release time. - Retarget the version-sync flow from GHCR tags to PyPI. It now regenerates `support/locks/` and `support/zizmor-version`, so the uv Dependabot entry is dropped and `.github/dependabot.yml` returns to its previous contents. Generated-by: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01RtqKBTSR2jQF7xhHMBpdoy
Co-authored-by: William Woodruff <william@yossarian.net>
Co-authored-by: William Woodruff <william@yossarian.net>
- `version: latest` is the default again and means what it did before: the newest zizmor release this action knows about, recorded in `support/zizmor-version`. `pinned` is gone. - Install by `pip download` + unpacking the wheel instead of building a throwaway venv: no venv creation cost, and no `bin/` vs `Scripts/` layout assumption. The wheel is still hash-verified against `support/locks/`. - Drop the "is zizmor self-contained" probe, which asserted nothing useful. - `support/sync-zizmor-versions.sh` becomes a PEP 723 `sync-zizmor-versions.py`; its workflow runs it under `uv run`. The regenerated locks differ only in the header naming the new script. Generated-by: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0149yUN3LvDGNFCZ2Tzv5na5
48f62f5 to
70e4620
Compare
|
Kusari PR Analysis rerun based on - 70e4620 performed at: 2026-10-03T06:17:06Z - link to updated analysis |
|
Yeah. I like the way you cleaned it up :D. Good job ! |
|
Not very scientific of me, but this seems to actually bring a nice perf bump based on recent CI runs. (That was kind of surprising, I would have expected the Docker pull + run to be faster. But no!) |
|
Thank you @potiuk! I'll likely do a 0.7.0 release with this tomorrow. |
Well. Not really - pulling the image has a number of overheads that "no-docker" does not have. Even if you have base images already, you need to pull the remaining layers and move them to docker engine's space - and then you have to bootstrap the container processes - with init and all the "new container intialization" dance - which is a lot more than just starting the process - especially on CI runners, that are not the fastest in the world and where by default docker is on (fast but not local) volumes. And those volumes are slow-ish. What helps with the speed up of docker operation (A LOT) - is something we are about to re-do in Airflow by bringing self hosted (big) VMS with lots of memory and wiping the pre-installed docker volumes - and re-creating them on tmpfs by taking a big part of memory for docker storage. That can give almost order of magnitude faster docker bootstrap and is extremely stable. EC2 mounted volumes can be quite chok'y - > i.e. often you get way slower behaviour for a while (noisy neighbours etc.). Then you could get fast docker.
Cool. We'll start using it after cooldown automatically :) |
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. Such runners are created and destroyed faster than full VM runners, and they don't count toward the concurrent limit on full Ubuntu runners. But the job could not use `ubuntu-slim`, because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.4 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.30.1). Running both versions locally with the `pedantic` persona reports the same findings, so the upgrade should not by itself introduce any new results in the Security tab. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. Such runners are created and destroyed faster than full VM runners, and they don't count toward the concurrent limit on full Ubuntu runners. But the job could not use `ubuntu-slim`, because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.2 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. The `advanced-security` and `annotations` inputs used here are unchanged in 0.7.1. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.29.0). Running both versions locally with the `pedantic` persona reports the same single finding, a low-severity `ref-version-mismatch` on an existing line in `release.yml`, so the upgrade should not by itself introduce any new results. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. It had been kept on `ubuntu-latest` only because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.4 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.30.1). Running both versions locally with the `pedantic` persona reports the same findings, so the upgrade should not by itself introduce any new results in the Security tab. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. Such runners are created and destroyed faster than full VM runners, and they don't count toward the concurrent limit on full Ubuntu runners. But the job could not use `ubuntu-slim`, because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.4 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown this repository gives Dependabot for updates. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.30.1). Running both versions locally with the `pedantic` persona reports the same findings, so the upgrade should not by itself introduce any new results in the Security tab. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. It had been kept on `ubuntu-latest` only because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.4 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.30.1). Running both versions locally with the `pedantic` persona reports the same findings, so the upgrade should not by itself introduce any new results in the Security tab. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. Such runners are created and destroyed faster than full VM runners, and they don't count toward the concurrent limit on full Ubuntu runners. But the job could not use `ubuntu-slim`, because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.2 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. The `advanced-security` and `annotations` inputs used here are unchanged in 0.7.1. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.29.0). Running both versions locally with the `pedantic` persona reports the same single finding, a low-severity `ref-version-mismatch` on an existing line in `release.yml`, so the upgrade should not by itself introduce any new results. Co-authored-by: Eliah Kagan <degeneracypressure@gmail.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. Such runners are created and destroyed faster than full VM runners, and they don't count toward the concurrent limit on full Ubuntu runners. The job could not use `ubuntu-slim` while `zizmorcore/zizmor-action` ran `zizmor` in a Docker container, since `ubuntu-slim` runners have a `docker` client but no daemon. But since version 0.7.0, which this workflow now uses, the action instead fetches a hash-pinned `zizmor` wheel with the runner's `python3 -m pip download` and runs the executable directly. That change was made to support `ubuntu-slim`: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the action needs, so switching the runner is the only change. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The `zizmor` job is fast, single-threaded, and uses little RAM, so it is the kind of job that `ubuntu-slim` runners are for. It had been kept on `ubuntu-latest` only because `zizmorcore/zizmor-action` ran `zizmor` in a Docker container. `ubuntu-slim` runners have a `docker` client but no daemon, so container-based steps can't run there. Starting in version 0.7.0, `zizmor-action` no longer uses Docker. Instead, it uses the runner's `python3 -m pip download` to fetch a hash-pinned `zizmor` wheel, then extracts and runs the executable. The upstream change was made to support `ubuntu-slim`, and the action's own selftests now run on it: zizmorcore/zizmor-action#169 The `ubuntu-slim` image provides Python 3.12 with `pip`, which is all the new installation method needs. So this upgrades `zizmor-action` from 0.6.4 to 0.7.1 and switches the job's runner to `ubuntu-slim`. 0.7.1 is used rather than the newer 0.8.0, because 0.8.0 is still within the 7-day cooldown we give Dependabot for updates. `zizmor-action` 0.7.1 defaults to `zizmor` 1.31.1 (up from 1.30.1). Running both versions locally with the `pedantic` persona reports the same findings, so the upgrade should not by itself introduce any new results in the Security tab. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
note - Both PR and description have been reviewed and updated by human (me).
At the Apache Software Foundation we are optimising our CI workflows by changing the runners to
ubuntu-slimfor small/fast jobs.zizmorusually fits the "small" expectations, but the action bootstraps it with Docker, andubuntu-slimhas no container engine: it ships the docker client without a daemon, socommand -v dockersucceeds there anddocker pullthen fails with a connection error.This PR drops Docker and installs
zizmorfrom its official PyPI wheels, using the runner's own Python. Nosetup-uv, no virtual environment and no extra JS action runs inside the action.How the action installs zizmor
support/locks/zizmor-<version>.txt(orzizmor-latest.txt).python3 -m pip download --only-binary=:all: --no-deps --require-hashesfetches the wheel for the runner's platform and verifies it against the lock.python3 -m zipfileand runszizmor-<version>.data/scripts/zizmordirectly.Every lock pins every wheel of its version by hash, so every version the action can run is pinned by hash, not just by version. That is the property the pinned container digests gave before.
versioninputUnchanged from the user's side:
latest(default)support/locks/zizmor-latest.txtX.Y.Z/vX.Y.Zlatestresolves inside the action's own tree, never from PyPI at run time, so a given release of this action always runs the same zizmor. An unknown version fails withUnknown version X.Y.Z; was it released after this action?, so the existing xfail selftest still holds.Keeping versions current
support/versionsandsupport/sync-zizmor-versions.share replaced bysupport/sync-zizmor-versions.py, a PEP 723 script. The hourly sync workflow now runs it underuv run(uv pinned, script dependencies locked insync-zizmor-versions.py.lock) and reads releases from PyPI instead of GHCR tags. For each stable release with wheels it:support/pyproject.toml(pluszizmor-latestfor the newest release). Each group is resolved on its own, never together with the others;uv pip compile --universal --generate-hashes --no-buildintosupport/locks/.As before, changes land as a draft PR for manual review.
Tests and dogfooding
ubuntu-slimis added to the basic selftest matrix, alongsideubuntu-latestandubuntu-24.04-arm.1.29.0,v1.29.0andlatest.ubuntu-slim. It uses the in-tree action (uses: $/) rather than the pinned v0.6.3 release, since that release still needs Docker and so cannot run onubuntu-slim.The README documents the Python requirement and notes that
ubuntu-slimis supported from v0.7.0.Generated-by: Claude Opus 5
Claude-Session: https://claude.ai/code/session_01CiacQ5MSzv4x9oLPeZvYDL
Pre-submission checks
Please check these boxes:
Mandatory: This PR corresponds to an issue (if not, please create
one first).
Having read the AI policy, I hereby disclose the use of an LLM or other
AI coding assistant in the creation of this PR. PRs will not be rejected
for using AI tools, but will be rejected for undisclosed use or
use that violates the policy.
If a checkbox is not applicable, you can leave it unchecked.
Summary
Switches installation of zizmor from Docker to hash-verified PyPI wheels installed with the runner's own Python, with per-version hash-pinned locks generated by an hourly sync workflow.
Test Plan
All selftests pass on
ubuntu-latest,ubuntu-24.04-armandubuntu-slim, including exact-version,latestand nonexistent-version runs. I also plan to test it in Airflow by pointing to the branch of my PR.Closes #74.