security(ci): run test-tool inside Docker container#9055
Conversation
Run tool install scripts inside the ghcr.io/jdx/mise:e2e Docker container to isolate them from the CI runner environment. This prevents tool scripts from accessing runner secrets, metadata tokens, or other sensitive environment variables. The grace period check still runs on the host since it needs the gh CLI and only queries GitHub APIs (no tool scripts). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummaryThis PR moves Confidence Score: 5/5Safe to merge — Docker isolation is well-structured, the stale-summary contamination bug from the previous review is properly addressed with the wc -l/tail offset, and the new --check-only path is logically correct for its only call site. No P0 or P1 issues found. The retry step correctly snapshots summary line count before re-running and reads only the new tail. Security boundary (pooled token only in container, real token only on host for gh API calls) is sound. One P2 style suggestion about missing flag validation in the Python script. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions Runner
participant D1 as Docker (e2e container)
participant D2 as Docker (e2e container retry)
participant H as Host (grace-period check)
GHA->>GHA: fetch-token → POOL_TOKEN
GHA->>GHA: docker pull ghcr.io/jdx/mise:e2e
GHA->>D1: docker run (POOL_TOKEN as GITHUB_TOKEN, ro workspace mount)
D1->>D1: mise test-tool [--all | tools]
D1-->>GHA: writes Failed Tools → $GITHUB_STEP_SUMMARY (bind-mount)
GHA->>GHA: grep "Failed Tools" → failed_tools output
alt failed_tools != ""
GHA->>GHA: wc -l $GITHUB_STEP_SUMMARY → summary_lines
GHA->>D2: docker run (retry failed tools only)
D2-->>GHA: appends new Failed Tools to $GITHUB_STEP_SUMMARY
GHA->>GHA: tail -n +(summary_lines+1) → new failed_tools
alt still failing AND NOT release branch
GHA->>GHA: exit 1
else still failing AND release branch
GHA->>H: mise run test-tool-retry --check-only --grace-period (real GITHUB_TOKEN)
H->>H: check_grace_period() via gh API
end
end
Reviews (4): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
Snapshot the summary line count before the retry run and only grep new lines, so successful retries don't pick up failures from the initial run. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 86bb7d7. Configure here.
- Pass MISE_EXPERIMENTAL, MISE_LOCKFILE, MISE_USE_VERSIONS_HOST_TRACK into Docker containers - Use POOL_TOKEN instead of GITHUB_TOKEN to prevent leaking workflow-level MISE_GH_TOKEN into containers when pool fetch fails - Replace grace period step with inline bash that only checks release dates via gh API, avoiding re-running tool scripts on the host Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --check-only flag to test-tool-retry that skips retrying tools and only checks grace periods. This keeps the logic in one place instead of duplicating it as inline bash in the workflow YAML. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.8 x -- echo |
24.2 ± 0.5 | 23.5 | 26.4 | 1.00 |
mise x -- echo |
24.9 ± 1.2 | 23.9 | 38.9 | 1.03 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.8 env |
23.9 ± 1.1 | 22.8 | 35.0 | 1.00 |
mise env |
24.2 ± 0.5 | 23.4 | 29.6 | 1.01 ± 0.05 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.8 hook-env |
24.1 ± 0.4 | 23.5 | 28.8 | 1.00 |
mise hook-env |
24.5 ± 0.3 | 23.8 | 26.1 | 1.02 ± 0.02 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.8 ls |
21.3 ± 0.5 | 20.7 | 29.3 | 1.00 |
mise ls |
21.8 ± 0.3 | 21.0 | 25.1 | 1.02 ± 0.03 |
xtasks/test/perf
| Command | mise-2026.4.8 | mise | Variance |
|---|---|---|---|
| install (cached) | 155ms | 155ms | +0% |
| ls (cached) | 80ms | 81ms | -1% |
| bin-paths (cached) | 85ms | 85ms | +0% |
| task-ls (cached) | 806ms | 776ms | +3% |
### 🐛 Bug Fixes - **(docs)** upgrade esbuild to 0.28.0 with es2022 build target by @jdx in [#9047](#9047) - **(env)** skip tools=true module hooks in dependency_env by @jdx in [#9011](#9011) - **(lockfile)** resolve SLSA provenance URLs deterministically for all platforms by @cameronbrill in [#8982](#8982) - **(registry)** test of docuum in registry by @jylenhof in [#8996](#8996) - **(release)** publish extracted mise.exe alongside Windows zip by @zeitlinger in [#8997](#8997) - **(schema)** add missing config fields by @risu729 in [#9044](#9044) - **(task)** support sandbox fields in task templates by @risu729 in [#9046](#9046) - **(tasks)** respect env precedence for task config by @risu729 in [#9039](#9039) - prevent implicit enabling of `self_update` when rustls features are enabled by @salim-b in [#9040](#9040) - allow installing bun and others when downloads folder is on a different mount by @bgeron in [#9032](#9032) ### 📚 Documentation - discourage direnv compatibility PRs and remove issue suggestions by @jdx in [ca78346](ca78346) - tighten direnv compatibility language by @jdx in [ab140c8](ab140c8) - add Tera tip for unsupported version files by @risu729 in [#9048](#9048) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:deb docker digest to 49fa8a4 by @renovate[bot] in [#8999](#8999) - update ghcr.io/jdx/mise:copr docker digest to 61ba7b6 by @renovate[bot] in [#8998](#8998) - update ghcr.io/jdx/mise:copr docker digest to fa351ff by @renovate[bot] in [#9002](#9002) - update ghcr.io/jdx/mise:alpine docker digest to f3bb475 by @renovate[bot] in [#9001](#9001) - update ghcr.io/jdx/mise:rpm docker digest to d45af2d by @renovate[bot] in [#9005](#9005) - update ghcr.io/jdx/mise:deb docker digest to d7463ac by @renovate[bot] in [#9004](#9004) - update jdx/mise-action digest to 5228313 by @renovate[bot] in [#9007](#9007) - update rust docker digest to e8e2bb5 by @renovate[bot] in [#9008](#9008) - update taiki-e/install-action digest to 97a5807 by @renovate[bot] in [#9010](#9010) - update autofix-ci/action action to v1.3.3 by @renovate[bot] in [#9015](#9015) - update ubuntu:24.04 docker digest to 84e77de by @renovate[bot] in [#9012](#9012) - update actions/checkout action to v4.3.1 by @renovate[bot] in [#9014](#9014) - update ubuntu:26.04 docker digest to cc925e5 by @renovate[bot] in [#9013](#9013) - update rust crate tokio to v1.51.1 by @renovate[bot] in [#9018](#9018) - update rust crate zip to v8.5.1 by @renovate[bot] in [#9019](#9019) - update rust crate ctor to 0.9 by @renovate[bot] in [#9024](#9024) - update ubuntu docker tag to resolute-20260404 by @renovate[bot] in [#9020](#9020) - update dependency vitepress-plugin-tabs to ^0.8.0 by @renovate[bot] in [#9023](#9023) - update rust crate indexmap to v2.14.0 by @renovate[bot] in [#9025](#9025) - update rust crate nix to 0.31 by @renovate[bot] in [#9030](#9030) - update taiki-e/install-action digest to 7a4939c by @renovate[bot] in [#9027](#9027) - update dependency esbuild to v0.28.0 by @renovate[bot] in [#9022](#9022) - update rust crate rand to 0.10 by @renovate[bot] in [#9031](#9031) - update rust crate digest to 0.11.0 by @renovate[bot] in [#9028](#9028) - update rust crate confique to 0.4 by @renovate[bot] in [#9026](#9026) - update rust crate rattler to 0.40 by @renovate[bot] in [#9034](#9034) - lock file maintenance by @renovate[bot] in [#8416](#8416) - disable renovate for aws-config/aws-sdk-* crates by @jdx in [#9052](#9052) - update swatinem/rust-cache digest to e18b497 by @renovate[bot] in [#9009](#9009) ### 📦 Registry - remove broken tool tests by @jdx in [#9017](#9017) - update granted aqua backend repo by @risu729 in [#9033](#9033) - fix atlas-community test expected output by @jdx in [#9054](#9054) ### Chore - use deprecated_at! macro for ubi backend deprecation by @jdx in [#9049](#9049) ### Security - **(ci)** run test-tool inside Docker container by @jdx in [#9055](#9055) - **(ci)** avoid exposing MISE_GH_TOKEN to test-tool scripts by @jdx in [#9053](#9053) ### New Contributors - @bgeron made their first contribution in [#9032](#9032) - @salim-b made their first contribution in [#9040](#9040) ## 📦 Aqua Registry Updates #### Updated Packages (2) - [`cloudnative-pg/cloudnative-pg/kubectl-cnpg`](https://github.com/cloudnative-pg/cloudnative-pg/kubectl-cnpg) - [`gleam-lang/gleam`](https://github.com/gleam-lang/gleam)

Summary
mise test-toolinsideghcr.io/jdx/mise:e2eDocker container to isolate tool install scripts from the CI runnerACTIONS_RUNTIME_TOKEN, etc.) and host environmentGITHUB_TOKEN(pooled) is passed into the containerGITHUB_STEP_SUMMARYis bind-mounted so job summaries still workghCLI and only queries APIsTest plan
🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk: changes the
registry.ymlCI execution environment and retry behavior, which could cause unexpected test failures/flakiness or summary parsing issues, but it’s scoped to CI and not production runtime.Overview
Registry CI now runs tool tests inside Docker. The
test-tooljob pullsghcr.io/jdx/mise:e2eand executesmise test-tool(and the retry run) viadocker run, bind-mounting the workspace, the builtmisebinary, andGITHUB_STEP_SUMMARY, and passing only a pooledGITHUB_TOKENinto the container.Retry/grace-period handling is reworked. The workflow now captures retry failures explicitly (failing PRs after a retry), while release branches run
mise run test-tool-retry --check-only --grace-periodon remaining failures;xtasks/test-tool-retry.pyadds--check-onlyto skip reruns and only apply the grace-period evaluation.Reviewed by Cursor Bugbot for commit 5f398e8. Bugbot is set up for automated code reviews on this repo. Configure here.