ci: fail the Lint and Build fast path on a runtime download #168

Open
opened 2026-11-15 14:29:06 +00:00 by Claude · 1 comment
Owner

Spec: CI image pipeline: keep, simplify or replace, resolution section 1 (the "bake in" rule).

What

When a Lint or Build job's pin checksums match its image (the fast path), run its tool steps with no network access, so a tool that downloads at runtime fails the job instead of slowing it down silently. The slow path keeps network access.

This is a control only if it is cheap. Try unshare -n, container.network: none for the steps after checkout, or the equivalent. If no approach stays under about 20 lines of workflow and does not break the checkout, close this issue with what was tried, and the rule stays held by review.

Acceptance

  • Adding a runtime download to a fast-path step fails the job.
  • The slow path still installs and passes.
Spec: [CI image pipeline: keep, simplify or replace](https://git.rkdr.net/Mortis/Kamino/issues/96), resolution section 1 (the "bake in" rule). ## What When a Lint or Build job's pin checksums match its image (the fast path), run its tool steps with no network access, so a tool that downloads at runtime fails the job instead of slowing it down silently. The slow path keeps network access. This is a control only if it is cheap. Try `unshare -n`, `container.network: none` for the steps after checkout, or the equivalent. If no approach stays under about 20 lines of workflow and does not break the checkout, close this issue with what was tried, and the rule stays held by review. ## Acceptance - Adding a runtime download to a fast-path step fails the job. - The slow path still installs and passes.
Claude added the
Status
Ready for Agent
label 2026-11-15 14:29:06 +00:00
Claude added this to the Continuous delivery milestone 2026-11-15 22:21:20 +00:00
Author
Owner

Review of the map (2026-11-15): corrections to this issue.

  • Two of the suggested approaches are unlikely to work as written. Plain unshare -n needs CAP_SYS_ADMIN, which Docker's default seccomp profile does not give a job container. container.network: none (or --network none in container.options) applies to the whole job, checkout included, which the issue rules out. Change: list the approaches in this order:

    1. unshare -rn -- <step> (a user namespace plus a network namespace; Docker's default profile allows unshare --user). It may still be refused inside a nested container, so test it on the runner.
    2. If that is refused: an environment-only guard on the fast-path steps: PIP_NO_INDEX=1, http_proxy and https_proxy set to an unreachable local address, and no_proxy empty. This catches pip, curl, git over HTTPS and cargo, but not raw sockets; say so in the PR.

    The close-if-not-cheap clause stays as written.

Review of the map (2026-11-15): corrections to this issue. - **Two of the suggested approaches are unlikely to work as written.** Plain `unshare -n` needs `CAP_SYS_ADMIN`, which Docker's default seccomp profile does not give a job container. `container.network: none` (or `--network none` in `container.options`) applies to the whole job, checkout included, which the issue rules out. Change: list the approaches in this order: 1. `unshare -rn -- <step>` (a user namespace plus a network namespace; Docker's default profile allows `unshare --user`). It may still be refused inside a nested container, so test it on the runner. 2. If that is refused: an environment-only guard on the fast-path steps: `PIP_NO_INDEX=1`, `http_proxy` and `https_proxy` set to an unreachable local address, and `no_proxy` empty. This catches pip, curl, git over HTTPS and cargo, but not raw sockets; say so in the PR. The close-if-not-cheap clause stays as written.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#168