Skip to content

Proxmox e2e leaves the tenant super-admin kubeconfig on the runner #4806

Closed

Description

The Proxmox e2e suite leaves the tenant's super-admin kubeconfig on the self-hosted runner after every run. hack/e2e-chainsaw/_lib/run-proxmox.sh writes it to ${TMPDIR:-/tmp}/proxmox-e2e-tenant.kubeconfig in fetch_tenant_kubeconfig, and nothing removes it afterwards. The "Remove staged credentials" step in .github/workflows/e2e-proxmox.yaml deletes only the management kubeconfig and the SSH key.

The umask 077 in that workflow is set inside the Stage step only, so the suite step runs with the runner's default umask. On a usual 022 the file is readable by any local user on the runner. I inferred that from the default umask and did not check it on the runner itself.

Fix: write the file under $RUNNER_TEMP or the workspace with umask 077, and add its path to the cleanup step.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/ciIssues or PRs related to CI workflows, GitHub Actions, automation
    on Oct 7, 2026
  2. lexfrei commented on Oct 7, 2026

    @lexfrei
    ContributorAuthor

    The leftover file is also read by a later run. dump_diagnostics in run-proxmox.sh checks [ -s "$TENANT_KUBECONFIG" ] and then runs kubectl get nodes and get pods -A with it. When a run fails before fetch_tenant_kubeconfig, for example in apply_tenant or the control plane wait, the dump uses the previous run's file. The log then shows that run's tenant, or an unreachable endpoint, as if it were the current one. Removing the file at the start of each run, or keeping it in a per-run directory, fixes this together with the cleanup above. I found this by reading the script, not by a run on the runner.

  3. themoriarti commented on Oct 19, 2026

    @themoriarti
    Collaborator

    Fix in #4971: the file moves to a per-run location (COZY_PROXMOX_WORKDIR, set to runner.temp by the workflow), is written under umask 077, and is removed at the start of apply-tenant, in the suite's finally, and in the workflow's credential cleanup step. That covers both the leftover file and the stale read in dump_diagnostics from your comment.

  4. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Oct 19, 2026
  5. added 2 commits that reference this issue on Nov 1, 2026
    6123850
    048c029
  6. added 2 commits that reference this issue on Nov 10, 2026
    2af6053
    a14ad50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciIssues or PRs related to CI workflows, GitHub Actions, automationkind/bugCategorizes issue or PR as related to a bugtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions