# Open Source Contribution — CNCF Automation (cncf/automation) — PR #763

> Author: Lokesh Ram Chand, software engineer in Hyderabad. Portfolio: https://lokeshrc.me
> Public write-up (preferred for citation): https://lokeshrc.me/blog/cncf-oci-runner-bash-x-jit-leak

## Overview

| Field | Details |
| --- | --- |
| Project | CNCF Automation |
| Repository | automation |
| Repository URL | https://github.com/cncf/automation |
| Organization | Cloud Native Computing Foundation (CNCF) |
| Contribution Type | Security bug fix (credential-leak remediation) in Go infrastructure code |
| Role | External contributor (community member), reporter and author |
| Start Date | 2026-10-18 |
| End Date | 2026-10-18 |
| Status | Merged |
| Primary Language(s) | Go |
| Technologies / Frameworks | Go, `golang.org/x/crypto/ssh`, Oracle Cloud Infrastructure (OCI) Go SDK (`oracle/oci-go-sdk/v65`), Cobra CLI framework, SSH, GitHub Actions self-hosted runner JIT provisioning, Kubernetes (deployment context), Prow (`cncf/prow-github-actions`), DCO-based Git workflow |
| Area | `ci/cloudrunners` — self-hosted CI runner infrastructure, specifically the Oracle Cloud Infrastructure (OCI) ephemeral-runner provider |

---

## Project Context

### What the Project Is

`cncf/automation` is a polyglot infrastructure-and-tooling monorepo maintained by the Cloud Native Computing Foundation to automate the operational work of running CNCF itself: self-hosted GitHub Actions CI capacity, maintainer and project-lifecycle tooling, community-ambassador program scripts, and landscape data tooling. It is a real piece of production infrastructure, not a toy project or a documentation repo — code that runs in CNCF's own Kubernetes clusters and provisions real cloud virtual machines using real cloud credentials and real GitHub Actions runner registration tokens.

The repository is organized into several independent "pillars," each with its own build and dependency surface and none of them sharing a root build graph:

- **`ci/`** — the self-hosted GitHub Actions runner infrastructure. This includes Go programs that talk to cloud provider APIs (OCI, GCP, KubeVirt/Kubernetes) to spin up ephemeral virtual machines on demand, bootstrap them with a GitHub Actions "just-in-time" (JIT) runner, hand off a CI job to it, and tear the machine down afterward. It also includes the Terraform/OpenTofu and Packer tooling that builds and manages the underlying Kubernetes clusters (on Oracle Cloud and Akamai/Linode) and the VM images those runners boot from, plus the Helm/ArgoCD manifests that deploy the whole stack.
- **`utilities/`** — standalone Go and Python tools, including a landscape-data sync tool, an MCP server for the CNCF Landscape, and a "dot-project" validator/bootstrapper for CNCF project metadata.
- **`Ambassadors/`** and **`Kubestronaut/`** — Python scripts that automate community programs (Google Sheets–driven ambassador tracking, Shopify coupon/kit operations for the Kubestronaut certification program).
- **`tests/syntax_check.py`** — a lightweight, credential-free CI gate that `py_compile`s every tracked Python file in the repo, acting purely as a syntax check rather than a functional test suite.

There is deliberately **no root build, no Go workspace (`go.work`), and no shared package manager** tying these pillars together. Each of the six independent Go modules in the repository (`ci/cloudrunners`, `ci/gha-runner-vm`, `ci/gha-runner-vm-oci`, `utilities/dot-project`, `utilities/landscape-mcp-server`, `utilities/landscape-sync`) has its own `go.mod`, its own build process, and its own test suite. This is a deliberate architectural choice that keeps unrelated infrastructure — a Shopify coupon script and an Oracle Cloud VM launcher, for instance — from ever needing to agree on a dependency version, at the cost of some duplicated boilerplate across modules.

The repository enforces a strict Go-version guard across all six modules and every Dockerfile: `.go-version` is the single source of truth (at the time of this contribution, Go 1.27.1), and `.github/scripts/check-go-version.sh` fails CI if the `go` directive in any `go.mod`, any `FROM golang:` line, any Go tarball download URL, or any hardcoded `go-version:` field in a workflow doesn't match it exactly. This guard exists because the repository's Go modules are built and deployed independently (as container images, as CLI binaries, inside CI workflows) and a silent version drift between them has historically been the kind of thing that causes subtle, hard-to-diagnose build or behavior differences between providers that are nominally interchangeable.

Governance follows the standard CNCF/Kubernetes-style community tooling: Prow-style slash commands (`/kind`, `/area`, `/priority`, `/status`, `/lgtm`, `/approve`, `/hold`) are wired through `cncf/prow-github-actions` via `.github/workflows/prow.yml`, with reviewers and approvers declared in per-directory `OWNERS` files and routing configured in `.github/prow.yaml`. Every commit requires a Developer Certificate of Origin sign-off (`git commit -s`, producing a `Signed-off-by:` trailer). GitHub Actions workflows are expected to be SHA-pinned (checked by the Kusari Inspector via `kusari.yaml`), reflecting that this repository, as CNCF's own automation substrate, holds itself to supply-chain hardening standards consistent with the security posture CNCF expects of its hosted projects.

### My Contribution Context

The specific subsystem this contribution touches is `ci/cloudrunners`, a small Go CLI (built with the Cobra framework) that implements **ephemeral, preemptible, self-hosted GitHub Actions runners** across three cloud backends — Oracle Cloud Infrastructure (`oci/`), KubeVirt-on-Kubernetes (`kubevirt/`), and Google Cloud Platform (`gcp/`, described in the repository's own documentation as "a kept, manual-run provider" that is not shipped in the main container image or invoked by any workflow). A `CLOUDRUNNER_PROVIDER` environment variable, consumed by `entrypoint.sh` in the multi-stage Dockerfile, selects which compiled binary actually runs (`oci` is the default); `oci` and `kubevirt` are the two providers that ship in the production container image and are built by CI/CD.

Functionally, each provider follows the same lifecycle, implemented independently per cloud:

1. Launch a short-lived VM (or `kubevirt` VM-on-Kubernetes) from a pre-baked image that already contains a cached GitHub Actions runner tarball and language toolchains.
2. Wait for the instance to become reachable, then open an SSH connection to it (`ci/cloudrunners/pkg/remote`, a small shared package providing `DialWithRetry`, an `SSHClient.RunCommand` wrapper around `golang.org/x/crypto/ssh`, and ECDSA keypair generation for each ephemeral session).
3. Run a fixed sequence of shell commands over that SSH connection to finish provisioning the box (loading kernel modules, moving cached toolchain directories into place, setting `sysctl` limits for inotify watches used by file-watching tools, granting the `ubuntu` user access to the Docker socket) and, as the final command, start the actual GitHub Actions runner binary with a **JIT (just-in-time) config** — a single-use, short-lived credential blob that GitHub issues per job and that the runner consumes to register itself and immediately begin executing the queued CI job.
4. On completion (or on `SIGTERM`/`SIGINT` from pod termination, or on detecting OCI preemption of a spot instance), delete the ephemeral machine.

Because step 3 runs *arbitrary shell over SSH* and because `RunCommand`'s implementation (`session.CombinedOutput`) deliberately returns the **combined stdout+stderr of the remote command** so the Go program can log it for debugging, anything the remote shell prints during that step flows straight into the cloudrunner pod's own log stream — and from there into whatever log aggregation / SIEM / long-term storage CNCF's infrastructure ships pod logs to. That property is the entire basis of this contribution: a one-character difference in how a shell command is invoked (`bash -x script.sh ...` versus `bash script.sh ...`) decides whether a single-use runner credential gets written into that log stream or not.

### Relevant Component

- `ci/cloudrunners/oci/main.go` — the Oracle Cloud Infrastructure provider; specifically its `runOnMachine` function, which SSHes into a freshly launched OCI compute instance and runs the fixed provisioning/runner-startup command sequence described above. This is the file and function this PR modifies.
- `ci/cloudrunners/kubevirt/main.go` — the sibling KubeVirt provider, whose equivalent `run`/`runOnMachine` logic had already been patched for the identical class of bug five months earlier in commit `9b361771` ("prevent secret exposure," 2026-03-12), and which this PR explicitly cites as the precedent and target state to match.
- `ci/cloudrunners/pkg/remote/client.go` — the shared SSH client wrapper (`DialWithRetry`, `SSHClient.RunCommand`) whose `CombinedOutput`-based implementation is *why* the leak is possible in the first place; this contribution doesn't modify it but its behavior is central to the root-cause analysis in the linked issue.
- `ci/cloudrunners/gcp/main.go` — the third, manually-run provider, referenced as a negative control: it never used `bash -x` and was therefore never affected, which the issue report explicitly verified and called out rather than assuming.

---

# Contributions

## Contribution 1 — Drop `bash -x` in the OCI cloudrunner's final runner-start command to stop a GitHub Actions JIT config from being written into pod logs

**Type:** Security bug fix (credential/secret exposure remediation)
**Status:** Merged (PR #763), closing issue #762
**Date:** Reported and fixed 2026-10-18; merged same day at 18:32:58 UTC

### Problem

`ci/cloudrunners/oci/main.go`'s `runOnMachine` function ends its list of provisioning commands with the command that actually starts the GitHub Actions runner on the freshly launched VM:

```go
"export PATH=$PATH:/home/ubuntu/.local/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.rustup/bin && export HOME=/home/ubuntu && export NVM_DIR=/home/ubuntu/.nvm && bash -x /home/ubuntu/run.sh --jitconfig \"${ACTIONS_RUNNER_INPUT_JITCONFIG}\"",
```

The surrounding loop already takes care, by design, to keep the JIT config out of the *first* layer of logging: the command string that gets `log.Println`'d still contains the literal placeholder `${ACTIONS_RUNNER_INPUT_JITCONFIG}`, and only a separately computed `expanded` string (built via `strings.ReplaceAll(cmd, "${ACTIONS_RUNNER_INPUT_JITCONFIG}", os.Getenv("ACTIONS_RUNNER_INPUT_JITCONFIG"))`, never logged) is actually sent to `sshClient.RunCommand`. There's an explicit `// Avoid logging token` comment on that line making the intent plain. This is a correct and deliberate piece of defensive coding — on its own.

The problem is what happens *after* that command runs. `bash -x` turns on xtrace mode in the remote shell: every command bash executes gets echoed to its stderr *with all variable and parameter expansions already substituted* — meaning the real, unredacted JIT config value, not the placeholder. `sshClient.RunCommand` (in `ci/cloudrunners/pkg/remote/client.go`) is implemented as:

```go
func (s *SSHClient) RunCommand(ctx context.Context, cmd string) ([]byte, error) {
	session, err := s.sshClient.NewSession()
	if err != nil {
		return nil, fmt.Errorf("failed to create ssh session: %w", err)
	}
	defer session.Close()

	output, err := session.CombinedOutput(cmd)
	return output, err
}
```

`session.CombinedOutput` merges the remote command's stdout *and* stderr into the single `output` byte slice that's returned to the caller — which means the `-x` trace (a stderr stream) is captured right alongside normal output and handed straight back to `runOnMachine`. That function then logs it unconditionally, on both outcomes:

```go
output, err := sshClient.RunCommand(ctx, expanded)
if err != nil {
	log.Println(err, "running ssh command", "command", cmd, "output", string(output[:]))
	return fmt.Errorf("running command %q: %w", cmd, err)
}
log.Println("command succeeded", "command", cmd, "output", string(output))
```

So the careful redaction of `cmd` in the log line is completely undermined by `output`, which is logged in full on the very same line, on both the success and failure branches, and which — courtesy of `-x` — contains the plaintext JIT config regardless of whether the SSH command itself succeeded or failed. In effect, the code redacted the question ("what command did we run?") while answering the question in full anyway ("...and here's exactly what it expanded to, as proven by the shell's own trace"). A log line like `command succeeded command=... output=+ run --jitconfig <REAL_SECRET_VALUE>` ends up in whatever consumes the cloudrunner pod's stdout — which, in CNCF's own operational setup, is Kubernetes pod logs and everything downstream of them (log shipping, aggregation, potentially long-retention storage).

This was not a hypothetical concern invented for the bug report — it was a **regression of a previously fixed bug in a sibling file**. The KubeVirt provider (`ci/cloudrunners/kubevirt/main.go`) had the exact same `bash -x ... --jitconfig ...` pattern, and it was identified and fixed five months earlier in commit `9b361771` ("prevent secret exposure," authored by maintainer Koray Oksay with Copilot co-authorship, 2026-03-12), which both dropped `-x` and added a `sensitive` flag to suppress logging the command's *output* specifically for the JIT-config command. That fix, however, was never ported to the OCI provider — an easy thing to miss precisely because of this repository's explicit, deliberate architectural choice to keep the three cloud providers as independent, non-shared implementations with no common abstraction layer forcing a fix in one to propagate to the others. The GCP provider (`ci/cloudrunners/gcp/main.go`) was checked too, as a control, and confirmed to never have used `-x` at all (`/opt/actions-runner/run.sh --jitconfig "${ACTIONS_RUNNER_INPUT_JITCONFIG}"`, no `bash -x` wrapper) — so it was never exposed to this class of bug, and the issue report explicitly documents having checked this rather than assuming it based on the pattern seen in the other two providers.

### My Work

I discovered this by auditing the three cloudrunner providers against each other after noticing the kubevirt fix in the repository's git history, specifically looking for places where a security fix applied to one implementation hadn't been mirrored to its siblings — a natural thing to check given the repo's explicit "no shared abstraction between providers" design, which means there's no compiler or type system that would ever catch a missed fix like this; it can only be caught by a human (or an agent) deliberately diffing the providers against each other.

To confirm the leak mechanism without needing access to real CNCF cloud credentials or a live OCI runner, I built a minimal, self-contained reproduction that mirrors the actual code path's structural shape without touching any real infrastructure:

```sh
cat > run.sh <<'EOT'
#!/bin/bash
run() { :; }
run $*
EOT
bash -x run.sh --jitconfig SECRETJIT123 2>&1
# + run --jitconfig SECRETJIT123
```

This stand-in reproduces the same `run $*` invocation shape used by the real, upstream `actions/runner` project's `src/Misc/layoutroot/run.sh` (the actual script every GitHub-hosted and self-hosted Actions runner uses to bootstrap itself) closely enough to demonstrate, concretely and reproducibly, that `-x` causes the shell to echo the fully expanded argument list — including a secret passed as a CLI flag — to stderr, which is exactly the channel `CombinedOutput` captures. I was also explicit in the write-up about the boundary of what I had actually verified versus what I was inferring: I read the upstream `run.sh` source to confirm it *additionally* calls `"$DIR"/run-helper.sh $*`, meaning the real runner script would trace the JIT config a second time internally even independent of the cloudrunner's own `-x` flag — but I did not have the means to run this end-to-end against a real OCI-launched runner, and I said so plainly in both the issue and the PR ("I haven't traced a real runner end to end," "Not run against a real runner") rather than overstating confidence in an unverified claim about production behavior.

I also did an honest assessment of the actual exploitability/severity, rather than just flagging "secret in logs" generically: a GitHub Actions JIT config is a *single-use* credential — it's consumed the moment the runner process registers with GitHub using it, and the cloudrunner's `log.Println` call only fires *after* `sshClient.RunCommand` returns, which is only after the entire remote command — including the runner's full execution of the CI job — has finished and the SSH session has closed. So by the time the leaked value actually lands in the pod's log stream, the credential itself is already consumed and no longer independently useful to register a *second*, attacker-controlled runner. I stated this plainly as a mitigating factor in the issue's "Impact" section rather than inflating the severity of the finding. The residual risk I identified was narrower but still real: it's credential material sitting in pod logs and in anything downstream of them — log aggregation, retention systems, anyone with read access to CNCF's cluster logs — and leaving credential-shaped strings in long-lived logs is exactly the kind of thing that compounds into bigger problems later (wrong assumptions about what's safe to share, automated secret-scanners firing false-positive-shaped-but-real alerts, or simply bad hygiene that makes a future, more severe leak in the same code path more likely to go unnoticed).

I then filed this as a public GitHub issue (#762) before writing any code, giving the project maintainers full technical detail — the exact vulnerable line, the mechanism, the proof-of-concept, the explicit tie to the prior kubevirt fix commit, the explicit check of the gcp provider, and a stated proposed fix — so that the fix itself (once submitted) would be reviewable against a clearly pre-documented rationale rather than requiring the reviewer to reverse-engineer intent from the diff alone. I self-applied the `/kind bug`, `/priority medium`, and `/area ci` Prow labels on the issue, correctly using this repository's label-automation surface rather than leaving the maintainers to triage labeling from scratch.

### Technical Implementation

The fix itself is intentionally minimal — a single line changed, one character sequence removed:

```diff
--- a/ci/cloudrunners/oci/main.go
+++ b/ci/cloudrunners/oci/main.go
@@ -391,7 +391,7 @@ func runOnMachine(ctx context.Context, machine *oci.EphemeralMachine, sshKeyPair
 		"sudo setfacl -m u:ubuntu:rw /var/run/docker.sock",
 		"sudo sysctl fs.inotify.max_user_instances=1280",
 		"sudo sysctl fs.inotify.max_user_watches=655360",
-		"export PATH=$PATH:/home/ubuntu/.local/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.rustup/bin && export HOME=/home/ubuntu && export NVM_DIR=/home/ubuntu/.nvm && bash -x /home/ubuntu/run.sh --jitconfig \"${ACTIONS_RUNNER_INPUT_JITCONFIG}\"",
+		"export PATH=$PATH:/home/ubuntu/.local/bin:/home/ubuntu/.cargo/bin:/home/ubuntu/.rustup/bin && export HOME=/home/ubuntu && export NVM_DIR=/home/ubuntu/.nvm && bash /home/ubuntu/run.sh --jitconfig \"${ACTIONS_RUNNER_INPUT_JITCONFIG}\"",
 	}
```

Removing `-x` means the remote `bash` invocation of `run.sh` no longer runs in xtrace mode, so the shell stops echoing every executed command (with expanded arguments, including the real JIT config) to stderr in the first place. Since `CombinedOutput` only has access to whatever the remote process actually writes to stdout/stderr, eliminating the trace at its source eliminates the leak at its source — rather than trying to filter, redact, or suppress it after the fact at the Go-side logging call, which is both more code and strictly more fragile (any future code path that logs `output` differently, or any change to what `run.sh` itself writes to stdout, could reopen the hole if the fix lived in the logging layer instead of removing the actual tracing).

This is a deliberately conservative, surgical fix: I chose to **match exactly what the KubeVirt provider's prior fix did** (drop `-x`) rather than *also* porting over the `sensitive`-flag/output-suppression mechanism that `9b361771` added to kubevirt on top of dropping `-x`. That second mechanism exists in kubevirt as defense-in-depth against *other* things the remote command might print to its own stdout/stderr independent of `-x` tracing (for instance, if `run.sh` itself, or anything it calls, ever echoes its own arguments). For the OCI provider specifically, with `-x` removed, the specific leak vector described in the issue (the shell's own trace) is closed; I did not claim the broader defense-in-depth posture was needed or add unrequested scope — the PR solves the exact problem described in the linked issue, with a diff an approver can review in seconds and be fully confident does *only* what it says it does. (As later work would show — see **Related Work**, below — even the more elaborate kubevirt mechanism carried its own hidden bug, which is a point in favor of having kept this OCI fix minimal rather than copying a more complex pattern over without being asked to.)

### Technologies / Concepts

- **Go** — struct literals, string slices, `strings.ReplaceAll`, closures, `log.Println` structured-ish logging conventions already established in the file.
- **SSH remote command execution** — `golang.org/x/crypto/ssh`, `session.CombinedOutput` semantics (why it merges stdout and stderr, and why that matters for what ends up logged).
- **Shell semantics** — `bash -x` (`xtrace`) specifically, and the general principle that shell tracing modes are an execution-transparency feature that is fundamentally in tension with handling secrets in shell arguments.
- **Secrets-in-logs as a vulnerability class** — recognizing that "don't log the secret" has to be verified end-to-end through every layer that could echo it (the invoking Go code *and* the remote shell *and* the program the remote shell calls), not just at the one call site where the obvious redaction lives.
- **GitHub Actions JIT runner registration** — understanding what a JIT config is (a single-use, short-lived credential blob issued per job), which materially informed the accurate, non-alarmist severity assessment in the issue.
- **CNCF/Prow community workflow** — filing an issue with proper `/kind`, `/priority`, `/area` labels, writing a PR body that explicitly follows the repo's PR template (`## Description`, `## Type of change` checklist, `## Testing`), self-assigning a reviewer with `/assign @koksay`, and signing commits per the DCO.

### Result

The one-line fix was reviewed and merged the same day it was opened. `koksay` (a repository maintainer and the `ci/cloudrunners` `OWNERS` approver) responded with `/lgtm` and `/approve` roughly eighteen minutes after being assigned, and Prow's automated `[APPROVALNOTIFIER]` bot comment confirmed the PR had satisfied its `OWNERS`-file approval requirement before GitHub auto-merged it. Total time from issue filed (18:09:23 UTC) to PR merged (18:32:58 UTC) was under 24 minutes.

### Impact

- Closes a real, if narrow-severity, secret-exposure gap in production CNCF CI infrastructure: the OCI self-hosted-runner provider no longer writes a GitHub Actions JIT runner config into its own pod logs.
- Brings the OCI provider's behavior back in line with the KubeVirt provider's (already-patched) behavior, removing a quiet inconsistency between the two actively-shipped providers that existed purely because this repository has no shared code path between its cloud providers to force such a fix to propagate.
- Demonstrates, and leaves behind in the issue tracker, a general-purpose lesson for this codebase: whenever one provider gets a security fix, the other sibling providers need an explicit audit pass, because nothing in the architecture will catch the gap automatically. (This exact lesson paid off two days later — see Related Work.)

### Pull Request

https://github.com/cncf/automation/pull/763 — "fix(cloudrunners/oci): drop bash -x to avoid leaking JIT config"

### Issue

https://github.com/cncf/automation/issues/762 — "fix(cloudrunners/oci): bash -x leaks the GitHub JIT runner config into pod logs"

### Commit(s)

- `0ee35cd99ddf82d88d41350cdf3c1913692a138c` — `fix(cloudrunners/oci): drop bash -x to avoid leaking JIT config`, signed off per DCO (`Signed-off-by: lokeshramchand-ctrl`).

### Review / Discussion

The review thread was short and procedurally clean, which is itself worth documenting as evidence of how to work within this project's governance model:

1. Immediately after opening the PR, I commented `/assign @koksay` to explicitly route the review to the maintainer who owns `ci/cloudrunners/OWNERS` and who had authored the original kubevirt fix this PR was modeled on — the person best positioned to recognize the pattern instantly.
2. Prow's `github-actions` bot posted the standard `[APPROVALNOTIFIER]` comment identifying that approval from an `OWNERS`-listed approver (`koksay`) in `ci/cloudrunners/OWNERS` was the only outstanding requirement.
3. `koksay` reviewed and replied with the two Prow slash commands that jointly clear a PR for merge in this governance model: `/lgtm` (maintainer judgment: the change looks correct) and `/approve` (OWNERS-file authority: this PR may merge). No change requests, no back-and-forth — the PR's own description had already pre-answered the obvious reviewer questions (why is this needed, what's the precedent, was it tested, what's the blast radius), which is very likely why the review cycle was effectively instantaneous.

---

# Technical Depth

## Architecture / System Understanding

The cloudrunner system this PR touches exists to solve a problem common to any project running CI at scale without wanting to pay for (or trust) GitHub-hosted runners for every job: GitHub-hosted runners are shared, rate-limited, and can't be customized with pre-installed toolchains or given access to internal resources, while persistent self-hosted runners carry their own operational and security burden (a long-lived VM that executes arbitrary untrusted PR code is a standing attack surface). The ephemeral-runner pattern implemented here threads that needle: a dedicated controller (outside the scope of this PR, but implied by the cloudrunner's design) requests a brand-new VM *per job*, the VM registers itself with GitHub using a one-time JIT credential scoped to exactly one job, runs that job, and is destroyed immediately afterward — so there is never a persistent, reusable machine for an attacker to have escalated privileges on even if a CI job's untrusted code did something malicious inside its own ephemeral sandbox.

Running this across three different cloud substrates (a bare-metal/VM cloud provider in OCI, a second bare-metal/VM cloud provider in GCP, and Kubernetes-native VMs via KubeVirt) rather than standardizing on one is itself a notable architecture decision, almost certainly driven by CNCF's actual funding and capacity-sourcing reality: cloud credits and compute capacity for a nonprofit foundation's CI needs come from multiple donor clouds (OCI and Akamai/Linode both appear elsewhere in this repository's Terraform stacks as CNCF infrastructure sponsors), so the automation has to be able to launch runners wherever capacity and sponsorship currently exist, with per-region and per-shape fallback logic (visible in `oci/main.go`'s `run()` function, which tries multiple shapes across multiple regions before giving up, specifically to prefer higher-performance instance shapes when available but gracefully fall back under capacity constraints) baked in as a first-class concern rather than an afterthought.

## Important Components

- **`runOnMachine` (`oci/main.go`)** — the function this PR modifies; owns the entire post-launch lifecycle of a single ephemeral VM: readiness wait, SSH dial, an architecture-specific nested-virtualization sanity check (x86: checks `/proc/cpuinfo` for `svm`/`vmx` flags and the existence of `/dev/kvm`; ARM64: inserts `nftables` rules needed for container networking inside nested VMs), the fixed provisioning command list, and finally the JIT-config-bearing runner-start command this PR's fix targets.
- **`pkg/remote.SSHClient`** — the shared, provider-agnostic SSH wrapper (`client.go`) used identically by both the `oci` and `kubevirt` providers; `DialWithRetry` retries the initial TCP+SSH handshake up to 99 times with a 2-second backoff to absorb the window between "VM reports as running" and "SSH daemon is actually accepting connections," and `RunCommand`'s `CombinedOutput`-based implementation is the mechanism this whole bug class routes through.
- **`pkg/remote.SSHKeyPair` / `CreateSSHKeyPair`** (`keypair.go`) — generates a fresh ECDSA P-384 keypair per launch attempt (reused across retries within one `run()` invocation, per the comment in `run()`: "Create SSH key pair once — reused across retry attempts"), so that every ephemeral VM gets injected with a brand-new public key via cloud-init/instance metadata rather than any shared, long-lived fleet key — another example of the "nothing persistent, nothing reusable" security posture running through this subsystem.
- **`oci.EphemeralMachine`** (`ci/cloudrunners/oci/pkg/oci`) — wraps the OCI Go SDK's compute and networking clients to launch, poll, and delete the actual compute instance; exposes `WaitForInstanceReady`, `ExternalIP`, `LifecycleState`, and `Delete`.
- **`entrypoint.sh` + multi-stage `Dockerfile`** — the OCI provider and the KubeVirt provider are built as two separate binaries (`cloudrunner-oci`, `cloudrunner-kubevirt`) baked into one Alpine-based container image; `CLOUDRUNNER_PROVIDER` at runtime picks which one actually executes, with all CLI arguments forwarded verbatim. The GCP provider is deliberately excluded from this build and from the image entirely.

## APIs / Interfaces

- **OCI Go SDK** (`github.com/oracle/oci-go-sdk/v65/{common,core}`) — `core.ComputeClient`/`core.VirtualNetworkClient` for instance lifecycle and networking, `common.ServiceError` for structured API error inspection (used by `isOutOfCapacityError` to distinguish capacity exhaustion from other failure modes and drive the region/shape fallback loop).
- **`golang.org/x/crypto/ssh`** — client-side SSH protocol implementation; `ssh.Dial`, `ssh.ClientConfig`, `ssh.InsecureIgnoreHostKey()` (host-key verification is intentionally skipped here, a reasonable tradeoff for a brand-new, never-before-contacted ephemeral VM whose only trust anchor is the freshly generated keypair injected at launch time, not a pre-known host key), `Session.CombinedOutput`.
- **Cobra CLI framework** (`github.com/spf13/cobra`) — defines the `gha-runner` command and its large flag surface (region, shape, compartment, subnet, fallback lists, preemption behavior, etc.), all parsed into the package-level `args` struct.
- **GitHub Actions JIT runner registration** — the `--jitconfig` flag consumed by the vendored `run.sh` runner-startup script; conceptually, this is the same mechanism GitHub's own `actions/runner` project uses for ephemeral, auto-registering runners (as opposed to the older, long-lived PAT/registration-token flow).

## Data Structures / Algorithms

Nothing algorithmically deep in this specific file — it's infrastructure orchestration code, not a performance-critical data-processing path. The one piece of "algorithmic" structure worth noting is the nested fallback search in `run()`: an ordered list of `regionConfig{Region, AvailabilityDomain, SubnetID}` entries built from the primary region/AD list followed by however many `--fallback-region` flags were repeated, then iterated shape-outer/region-inner specifically so that a *higher-priority shape* is exhausted across *all* regions before the code ever drops to a lower-priority shape — a deliberate ordering choice (explained in an inline comment) to prefer performance over mere availability when both are possible. This loop structure is adjacent to, but not modified by, this PR; understanding it was necessary context for correctly scoping the fix to just the one line that mattered.

## Distributed Systems Concepts

- **Ephemeral, single-use compute as a security boundary** — the core design pattern this whole subsystem embodies: isolate each CI job to a throwaway machine so that compromise or misbehavior in one job's execution environment can't persist or laterally move to the next job.
- **Credential scoping and lifetime** — the JIT config is the concrete instance of "narrowly scoped, single-use credential" as a distributed-systems security primitive, and correctly reasoning about *when* that credential stops being independently dangerous (after single use, before it's even logged) is exactly the kind of lifetime/ordering reasoning that matters when assessing the real severity of a leak in an asynchronous, multi-step provisioning pipeline.
- **Partial-failure handling across independent control planes** — the retry/fallback machinery in `run()` (capacity-exhaustion detection, cross-region/cross-shape retry, preemption detection and optional auto-rerun via a Kubernetes ConfigMap-backed queue) reflects the standard distributed-systems reality that any single cloud region or instance shape is an unreliable resource, and the system has to treat "try somewhere else" as a first-class, expected code path rather than a rare exception.
- **Signal-driven graceful shutdown** — `signal.NotifyContext` plus a background goroutine watching `ctx.Done()` to immediately delete the launched machine on `SIGTERM`/`SIGINT` (i.e., on pod termination) is the same "don't leak resources when the orchestrator kills you" pattern every long-running worker in a Kubernetes-managed fleet needs.

## Performance Considerations

This specific fix has **zero performance impact** — it removes a debug/trace flag from a shell invocation; the only change in runtime behavior is that the remote shell no longer emits (and the SSH session no longer transports, and the Go program no longer buffers/logs) the xtrace output stream. If anything, this is a very marginal *improvement*: less data crosses the SSH channel and gets held in memory as part of `output`, and less gets written to the pod's log stream — trivial in absolute terms, but directionally the right kind of "incidentally free" side effect for a security fix to have, since it means there was no performance-vs-security tradeoff to weigh or defend during review.

## Testing

The change itself is a one-character-class edit to a single string literal; there was no unit test to write or modify for it (the kubevirt sibling module does have a test file, `main_test.go`, but it was added two days later in the follow-up PR #769, not as part of this change). My own verification before opening the PR was:

- **Local reproduction**, external to the real codebase and real infrastructure: the `run.sh`/`bash -x` standalone script shown above, chosen specifically to mirror the `run $*` shape of the actual upstream `actions/runner` bootstrap script closely enough to be a meaningful proxy, confirming that `-x` causes full argument expansion in the trace output, and that removing it (which I additionally verified by re-running the same repro without `-x`) produces no trace output at all.
- **Static code review** of the exact log call sites in `runOnMachine` to confirm that `output` (not just `cmd`) is logged on both the success and failure branches, which is what makes the `-x` trace actually reach the logs rather than being merely present in an unused return value.
- **Cross-checking all three providers** (`oci`, `kubevirt`, `gcp`) rather than assuming the pattern was uniform, which is what surfaced both the precedent fix (kubevirt, already patched) and the negative control (gcp, never affected) — and which is exactly the kind of check that turns "I found one bug" into "I found one bug, confirmed a related one was already fixed elsewhere, and confirmed a third place that looked similar actually wasn't affected," a materially more useful report for maintainers to review and trust than a single isolated finding would have been.
- I explicitly disclosed the limits of this verification in both the issue and the PR body rather than presenting it as more thoroughly tested than it was: "I only ran the stand-in above and read the upstream `run.sh`. I haven't traced a real runner end to end," and in the PR itself, "One-line change to a command string; no behaviour change besides removing the trace. Not run against a real runner." This is a correctness-and-trust-building choice as much as a technical one — for a one-line diff with an obvious, mechanically verifiable rationale and an exact precedent already merged elsewhere in the same file tree, a maintainer can review and trust it almost by inspection, which is very likely part of why it merged within 24 minutes of being opened.

---

# Engineering Decisions

## Decision 1 — Fix the minimal, precise root cause (`-x`) rather than adding a broader secret-redaction layer

I had, in principle, two candidate fixes available: remove `-x` (stopping the leak at its source, the remote shell's tracing), or leave `-x` in place and instead change the Go-side logging to redact or omit `output` whenever the command being run is the JIT-config command (fixing it at the consumption end, the way the kubevirt `9b361771` commit *also* did, in addition to dropping `-x`). I chose the former, and did not also implement the latter for the OCI provider.

The reasoning: `-x` is an entirely optional debugging aid that was buying nothing in production (there's no evidence in the codebase that anyone was relying on the xtrace output for anything useful — it isn't parsed, surfaced in any dashboard, or referenced by any other code), while it was actively creating the vulnerability. Removing it is strictly simpler, strictly safer against *any* future change to what the remote command prints (a redaction layer only protects against the specific thing it was written to redact; removing the source of the leak protects against that entire category of future surprise), and produces a diff a reviewer can fully verify is correct just by reading it, with no new logic to reason about. Building the more elaborate `sensitive`-flag mechanism would have been solving a problem I hadn't actually found evidence of (ordinary stdout chatter from `run.sh` leaking something) rather than the one I had (xtrace specifically) — exactly the kind of unrequested scope-creep that makes small, high-trust security fixes harder to review quickly. This also matches [[cncf-automation-kubevirt-jitconfig]] project context: the *simpler* of the two historical fixes (dropping `-x`) had no bugs; the *more elaborate* one (the `sensitive`-flag redaction layer) is what later turned out to hide a functional regression — a real-world data point in favor of the "simplest fix that addresses the actual, demonstrated mechanism" philosophy applied here.

## Decision 2 — File a public issue before writing the fix, rather than going straight to a PR

Given how small the eventual diff was, I could have skipped the issue and opened the PR directly. I chose to document the vulnerability as a standalone issue first, with the full reproduction, root-cause explanation, cross-provider check, and an explicitly-scoped "Proposed fix" section, and only then open the PR that implements exactly that proposed fix and links back with `Fixes #762`.

This separation gives maintainers (and future readers of the repository's history) a durable, linkable record of *why* the change was needed that isn't entangled with the mechanics of the diff itself, and it means the PR description can stay short and point back to the issue for the full analysis rather than repeating it — which is exactly the structure this repository's own PR template (`## Description`, `## Type of change`, `## Testing`) is designed around. It also lets a reviewer sanity-check the *proposed* fix against the *actual* fix with a single glance at whether they match, before even reading the diff.

## Decision 3 — State verification limits honestly rather than implying end-to-end testing

Both the issue and the PR explicitly say the fix was not exercised against a real OCI-launched runner. This was a deliberate choice to keep the report's claimed confidence calibrated to its actual evidence: the mechanism (shell xtrace plus `CombinedOutput`) is something I could prove conclusively with a local repro and static reading of the code, but "does the real upstream `run.sh`, on a real OCI VM, actually behave exactly as modeled" is a claim I hadn't verified and said so. For a one-line, mechanically obvious fix in infrastructure code that's expensive and slow to test against real cloud resources (spinning up a real OCI VM, paying for it, waiting for boot, for the purposes of validating a change to a debug flag), this is the right level of rigor — and stating the gap explicitly, rather than letting a reviewer assume more testing happened than did, is what lets a maintainer decide for themselves whether that gap matters enough to ask for more before merging (in this case, `koksay` evidently judged that it didn't).

---

# Challenges

## Challenge 1 — Confirming the leak mechanism without secrets, without a real OCI account action, and without touching production

The hardest part of this contribution wasn't the fix (one line) — it was building confidence in the *exact* mechanism of the leak (not just "tracing seems risky" but "here is precisely what gets captured and precisely where it would get logged") without any ability to safely run the real code path, which requires real OCI credentials, launches a real billable VM, and handles a real, live GitHub Actions JIT credential that I had no legitimate way (and no business) obtaining outside of CNCF's own infrastructure.

### How I Solved It

I decomposed the real pipeline into its independently-verifiable pieces and tested each one in isolation, in an environment with zero real credentials or infrastructure involved: (1) does `bash -x` echo expanded arguments to stderr — verified with a throwaway, fictitious-secret shell script; (2) does `CombinedOutput` merge stderr into the captured output — verified by reading the `pkg/remote/client.go` source directly, which is unambiguous Go stdlib-adjacent behavior (`ssh.Session.CombinedOutput`'s documented contract); (3) does the Go code log that captured output unconditionally — verified by reading `runOnMachine`'s two `log.Println` call sites directly. Each piece, on its own, was fully and concretely verifiable without any cloud access at all; chained together, they fully explain the production leak without requiring the production leak to actually be reproduced live.

### What I Learned

A vulnerability report doesn't need a live, end-to-end exploit against production to be credible and actionable — it needs each *link* in the causal chain independently nailed down, explicitly stated as verified-or-not, so a maintainer who *does* have full context on the production environment can quickly check only the parts I couldn't verify myself (in this case: "does the real `run.sh` actually behave like my stand-in" — something `koksay`, who had presumably already dealt with the identical question when fixing the kubevirt sibling, could evaluate almost instantly from experience).

## Challenge 2 — Resisting the urge to fix more than was shown to be broken

Having found that the KubeVirt provider's prior fix included both "drop `-x`" *and* a `sensitive`-flag output-redaction mechanism, there was a natural pull to port the *entire* pattern to the OCI provider for "consistency" and extra defense-in-depth, rather than just the part that addressed the demonstrated, root-caused issue.

### How I Solved It

I deliberately held the fix to exactly the scope the issue described and could actually substantiate: the `-x` trace was the mechanism I had concretely demonstrated leaked the secret; I had not demonstrated (and didn't believe, based on reading `run.sh` and the provisioning command list) that `run.sh`'s *own*, non-traced stdout/stderr contained the secret in the OCI provider's case. Adding the redaction layer anyway would have been defending against a threat I hadn't shown existed, at the cost of a larger, harder-to-trivially-verify diff.

### What I Learned

In a security fix specifically, minimal and exactly-scoped is usually the *more* trustworthy choice, not a corner cut — a one-line diff that a reviewer can fully verify by inspection builds more confidence, and ships faster, than a "more thorough-looking" diff that actually requires the reviewer to independently re-derive why the extra parts are necessary. (It's also worth noting, in hindsight, that the more elaborate mechanism — ported wholesale into kubevirt via `9b361771` — is precisely what later broke kubevirt's runner registration entirely, per issue #768/PR #769; restraint here was, in retrospect, the right instinct and not just a stylistic preference.)

---

# Collaboration

## Maintainer / Contributor Interaction

Direct interaction was with `koksay`, the `ci/cloudrunners` area's `OWNERS`-file approver and the author of the original `9b361771` kubevirt fix this PR explicitly built on. I proactively self-assigned the review to them via `/assign @koksay` immediately after opening the PR, rather than leaving triage to chance — a reasonable choice given the PR's description already made clear *why* this specific person was the right reviewer (they'd fixed the identical bug class in the sibling file five months earlier).

## Code Review

The review consisted of `koksay`'s combined `/lgtm` + `/approve` comment with no requested changes. The absence of review back-and-forth is itself informative: it reflects that the PR description had already front-loaded every piece of context a careful reviewer would otherwise need to ask for (root cause, precedent, scope, what was and wasn't tested), which left nothing outstanding to resolve before approval beyond the reviewer's own confirmation that the diff matched the stated intent.

## Design Discussions

There was no separate design discussion thread — the "design" (match the existing, already-reviewed-and-merged kubevirt precedent exactly) was settled by the choice of fix itself and stated explicitly in the PR description ("This drops `-x`, matching the kubevirt provider (fixed in 9b361771)"), which is a form of design communication: rather than asking the maintainer to evaluate a novel approach, the PR asked them to confirm that a previously-approved approach was being applied correctly to a second file.

## Collaboration Skills Demonstrated

- Writing a vulnerability report that separates verified fact from reasonable-but-unverified inference, and says so explicitly.
- Proactively identifying and routing to the correct reviewer for a niche, prior-context-dependent fix rather than requiring the project's default triage process to make that connection.
- Using the project's own governance primitives correctly and completely (Prow labels, `/assign`, DCO sign-off, PR template adherence) rather than working around them — a form of collaboration that specifically respects a community's established process rather than treating it as friction to minimize.
- Appropriately-scoped, non-defensive PR framing: presenting a one-line diff as exactly that, with an honest testing-limitations statement, rather than over-selling its thoroughness.

---

# Outcomes

## Code

One line changed in `ci/cloudrunners/oci/main.go` (`+1/-1`), removing the `-x` flag from the `bash` invocation that starts the GitHub Actions runner on freshly launched OCI compute instances. Merged to `main` via commit `0ee35cd99ddf82d88d41350cdf3c1913692a138c`.

## Project Impact

Closes a credential-exposure gap in CNCF's production self-hosted CI infrastructure's OCI provider, bringing it to parity with the already-patched KubeVirt provider and eliminating a quiet, architecture-driven inconsistency between the project's two actively-shipped cloud providers. Also leaves behind, in the public issue tracker, an explicit and well-evidenced record of a reusable lesson for this codebase ("a fix in one cloudrunner provider needs a deliberate audit pass across the others, because nothing enforces it automatically") — a lesson that materially informed how I approached the related, slightly more involved kubevirt regression discovered two days later (see Related Work).

## User / Developer Impact

Primarily benefits whoever has access to CNCF's cluster/pod log aggregation for the `ci/cloudrunners` deployment — reducing the amount of credential-shaped material that accumulates there over time, and therefore reducing the operational and audit burden of having to treat those logs as sensitive, or of ever having to respond to an alert about a secret-shaped string showing up in them. Indirectly benefits anyone relying on the OCI-backed self-hosted runner fleet for CNCF project CI, insofar as it incrementally improves the overall security posture of the infrastructure their CI jobs run on.

## Recognition

Reviewed and approved same-day by maintainer `koksay` (`/lgtm`, `/approve`); merged without requested changes; automatically labeled `approved` and `lgtm` by the repository's Prow bot integration upon satisfying `OWNERS`-file review requirements.

---

# Skills Demonstrated

## Programming

Go (string manipulation idioms, structured logging conventions, SSH client usage patterns, reading and reasoning about an unfamiliar ~500-line CLI file well enough to scope a precise one-line fix within it).

## Software Engineering

Root-cause analysis across multiple layers of an execution pipeline (shell flag → SSH session output capture → application-level logging); minimal, precisely-scoped fixes; pre-fix issue documentation with explicit reproduction steps; honest calibration of claimed-vs-actual test coverage; cross-implementation auditing in a codebase with no shared abstraction to enforce consistency.

## Systems

Shell execution semantics (`bash -x`/xtrace), SSH session I/O stream semantics (`CombinedOutput` merging stdout and stderr), and the operational implications of what a long-running daemon's `log.Println` calls ultimately reach once emitted into a container's stdout (pod logs, log aggregation, retention).

## Distributed Systems

Ephemeral-compute-as-isolation-boundary design pattern; single-use/short-lived credential lifetime reasoning as a factor in real-world severity assessment; multi-region/multi-shape failover design (read and understood, though not modified, as necessary context); graceful-shutdown-on-signal patterns for orchestrator-managed workers.

## Infrastructure / Cloud

Oracle Cloud Infrastructure compute/networking concepts (availability domains, subnets, flexible shapes, preemptible/spot instances) as used by the OCI Go SDK; containerized multi-binary deployment via a provider-selecting entrypoint script; the operational reality of running self-hosted CI capacity across multiple sponsor clouds.

## Open Source

Working inside an existing OWNERS/Prow governance model; DCO sign-off discipline; writing issues and PRs that pre-answer a reviewer's likely questions; routing a review to the contextually-correct maintainer; respecting established process (slash commands, PR template, labeling conventions) rather than bypassing it.

---

# Evidence

| Evidence | URL / Reference | Description |
| --- | --- | --- |
| Repository | https://github.com/cncf/automation | CNCF's internal automation monorepo (CI infra, utilities, community-program scripts) |
| Pull Request | https://github.com/cncf/automation/pull/763 | "fix(cloudrunners/oci): drop bash -x to avoid leaking JIT config" — merged |
| Issue | https://github.com/cncf/automation/issues/762 | "fix(cloudrunners/oci): bash -x leaks the GitHub JIT runner config into pod logs" — closed by the PR |
| Commit | `0ee35cd99ddf82d88d41350cdf3c1913692a138c` | The single commit implementing the fix, DCO-signed |
| Merge commit | Merged directly as commit `0ee35cd9...` onto `main` (fast-forward/rebase-style merge; no distinct merge commit) | Merged 2026-10-18T18:32:58Z |
| Precedent commit | `9b361771` | "prevent secret exposure" — the earlier KubeVirt-provider fix this PR explicitly cites and matches |

---

# Key Technical Keywords

Go, GitHub Actions, self-hosted runners, JIT (just-in-time) runner registration, SSH (`golang.org/x/crypto/ssh`), `bash -x` / shell xtrace, `CombinedOutput`, secret/credential exposure, log hygiene, Oracle Cloud Infrastructure (OCI) Go SDK, ephemeral/preemptible compute, Kubernetes pod logs, log aggregation, Cobra CLI, DCO sign-off, Prow (`cncf/prow-github-actions`), OWNERS-based code review, CNCF, infrastructure-as-code adjacent tooling, root-cause analysis, minimal-diff security remediation.

---

# Related Work

This contribution was the first of a short, related sequence of fixes to the same JIT-config-handling code path across the `ci/cloudrunners` module, all authored by the same contributor within a four-day window:

- **PR #763 (this contribution, 2026-10-18)** — drops `bash -x` in the **OCI** provider, matching the KubeVirt provider's existing fix.
- **Issue #768 / PR #769 (2026-10-20)** — discovered that the *KubeVirt* provider's own prior fix (`9b361771`, the very precedent this PR had matched) had an inverted guard condition: it marked the JIT-config command as `sensitive` and then used that flag to *skip* substituting the real credential into the command sent to the VM at all, rather than only using the flag to suppress logging the *output*. Because SSH sessions opened by `pkg/remote` don't forward environment variables, the remote shell expanded the un-substituted placeholder to an empty string, so the KubeVirt runner silently started with `--jitconfig ""` and never registered — a functional regression hiding behind a security-motivated change. The fix extracted the substitution/sensitivity logic into a unit-testable `expandCommand` helper (with `TestExpandCommand` in a new `main_test.go`) and corrected the logic to always substitute while still suppressing logged output for sensitive commands. This is a direct, concrete illustration of the restraint discussed in **Decision 1** and **Challenge 2** above: the more elaborate mechanism, not the simpler `-x`-removal fix applied in PR #763, is what turned out to carry a latent bug.
- **PR #771 (2026-10-21)** — an unrelated fix in a different module (`utilities/dot-project`, correcting false-positive broken-link detection for valid `github.com` pages), evidence of continued, broader contribution activity in the repository beyond this specific issue thread.

Together, these three PRs represent the contributor's complete history in `cncf/automation` as of this writing (5 commits across 3 merged/landed PRs), with the `ci/cloudrunners` JIT-config work forming a coherent, self-directed security-hardening thread: find one leak, fix it by precedent, then audit the precedent itself and find that it had its own, differently-shaped bug.

---

# Timeline

| Date | Event |
| --- | --- |
| 2026-03-12 | Maintainer `koksay` merges `9b361771` ("prevent secret exposure"), fixing the identical `bash -x` JIT-config leak in the **KubeVirt** provider — the precedent this contribution later builds on. |
| 2026-10-18 18:09 UTC | Issue #762 filed: `bash -x` in the **OCI** provider leaks the GitHub Actions JIT runner config into pod logs; includes root-cause analysis, isolated reproduction, and an explicit cross-check confirming the GCP provider was never affected. |
| 2026-10-18 18:11 UTC | Issue #762 labeled `/kind bug`, `/priority medium`, `/area ci`. |
| 2026-10-18 18:13 UTC | Commit `0ee35cd9` authored and signed off: drops `-x` from the OCI provider's runner-start command. |
| 2026-10-18 18:13 UTC | PR #763 opened, referencing `Fixes #762`, explaining the fix matches the kubevirt precedent and noting the change was not run against a real runner. |
| 2026-10-18 18:14 UTC | Prow's `[APPROVALNOTIFIER]` bot comments that approval from an `OWNERS`-listed approver in `ci/cloudrunners/OWNERS` is required. |
| 2026-10-18 18:24 UTC | `/assign @koksay` — reviewer explicitly routed to the maintainer who authored the original kubevirt precedent fix. |
| 2026-10-18 18:31 UTC | `koksay` comments `/lgtm` and `/approve`. |
| 2026-10-18 18:32:58 UTC | PR #763 merged to `main`. Issue #762 auto-closed. |
| 2026-10-20 | Issue #768 filed and PR #769 merged: corrects an inverted `sensitive`-flag guard in the KubeVirt provider's own prior fix (`9b361771`) that had been silently preventing the real JIT config from ever reaching the VM, breaking runner registration entirely; adds `TestExpandCommand` unit coverage. |
| 2026-10-21 | PR #771 merged: unrelated fix in `utilities/dot-project` correcting false-positive broken-link detection for valid `github.com` URLs. |

---

# Notes

- All dates and timestamps above are taken directly from the GitHub API (`gh pr view`, `gh issue view`) for the referenced repository, issue, and PR numbers, and from `git log`/`git show` for the referenced commits, as of the time this document was written (2026-11-03).
- The repository's year-dated history (commits and issues from 2026) reflects the actual timestamps returned by the CNCF `automation` GitHub repository at the time of writing; no dates in this document have been altered or estimated.
- This write-up draws on the full `ci/cloudrunners` source tree (`oci/main.go`, `kubevirt/main.go`, `gcp/main.go`, `pkg/remote/client.go`, `pkg/remote/keypair.go`, the module's `Dockerfile` and `entrypoint.sh`, and `kubevirt/main_test.go`) as it stood in the repository at the time of writing, not merely the PR's own diff, in order to accurately describe the surrounding system the fix operates within.
- The "Related Work" section intentionally documents PR #769 and the #768 regression in detail because it directly validates the engineering judgment calls made in PR #763 (Decision 1, Challenge 2) with a real, later outcome rather than only in the abstract.
