ci(release): hardcode KO_DOCKER_REPO + publish chart as OCI artifact#339
Merged
Conversation
added 3 commits
June 1, 2026 01:27
SLSA L3 §parameterless-build requires that the build invocation cannot be influenced by operator-supplied parameters. Moving KO_DOCKER_REPO from the ko-publish job env onto the single step that calls `ko build` removes the env-line attack surface — nothing higher in the workflow can now redirect the image push target without editing this file. Closes #316.
Add a chart-publish job that runs on every release tag:
- helm package install/kubernetes/tracecore
- helm push oci://ghcr.io/tracecoreai/charts (resolves to .../tracecore)
- cosign sign --yes by digest (keyless; same workflow-identity
binding as the binary archives and container image)
- cosign verify smoke check before the job exits
- mirror the .tgz onto the GitHub Release for UI-discovery
Operators on air-gapped clusters can now `helm pull oci://...` without
cloning the repo; chart and binary share one cosign identity regex.
Chart README: documents the OCI install path.
RELEASE-CHECKLIST: adds a tag-cut verification step pulling the chart
on a fresh host and verifying the cosign signature.
Closes #317.
Signed-off-by: Tri Lam <tri@maydow.com>
Contributor
Author
|
Addressed reviewer nit: digest extraction now pipes through |
This was referenced Jun 1, 2026
trilamsr
added a commit
that referenced
this pull request
Jun 1, 2026
## Summary - Cross-cut audit of 27 PRs merged this session (#339-#374) per repo memory `feedback_review_discipline` (cross-cut at wave-end) + `feedback_pr_review_simplicity` (bias deletion). - 15 findings tabulated in `docs/v1-rc1-post-wave-audit.md` with severity + proposed fix. - 9 follow-up issues filed: #375-#383 (labeled `post-wave-audit`). ## Headline finding **#377** (k8s pod/ns/node attribute scope helper) is the single largest deletion opportunity in the wave — 82 sites x ~4 lines of duplicated `resAttrs.Get -> attrs.Get` fallback ladder, replaceable by a ~10-line helper. ~80 LOC net delete with zero behavior change. ## Bundled refactor opportunity (named loudly for dispatch) Issues **#377 + #378 + #375 + #376** land as one refactor PR drop ~400 LOC across `module/processor/patterndetectorprocessor/` with zero behavior change. Suggested title: `refactor(patterndetector): hoist k8s scope helper + relocate per-pattern projectors`. ## Findings by severity | Severity | Count | Issues | |---|---|---| | high | 1 | #377 | | medium | 4 | #375, #376, #379, #382 | | low | 5 | #378, #380, #381, #383, (#9 historical) | | none | 5 | clean | ## Test plan - [x] `make lint` (golangci-lint, vet, mod verify) ran via pre-commit hook; 0 issues. - [x] attribute-namespace-check: 100 attributes, 100 documented. - [x] no-autoupdate-check: all assertions passed. - [x] hit-line-format-stable: ok. - [ ] Reviewer: confirm the 9 filed issues (#375-#383) cover the dispatchable findings; flag any that should be closed as out-of-scope. Signed-off-by: Tri Lam <tri@maydow.com> Co-authored-by: Tri Lam <tri@maydow.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two
rc1-prepissues that both touch.github/workflows/release.yml.#316 — Hardcode
KO_DOCKER_REPOat the step levelSLSA L3 §parameterless-build requires that the build invocation cannot
be influenced by operator-supplied parameters. Previously
KO_DOCKER_REPOlived on theko-publishjob'senv:block, whichSLSA's verifier treats as a job-level input that could be overridden.
Moved onto the single step that actually invokes
ko build. Nothinghigher in the workflow can redirect the image push target without
editing this file.
Acceptance check:
grep KO_DOCKER_REPO .github/workflows/release.ymlreturns only the one step-scoped assignment (line 493) — all other
matches are comments.
#317 — Publish chart as OCI artifact + cosign keyless sign
Air-gapped operators previously had to
git cloneto get the chart.Added a
chart-publishjob that runs on every release tag:helm package install/kubernetes/tracecorehelm push oci://ghcr.io/tracecoreai/charts(resolves tooci://ghcr.io/tracecoreai/charts/tracecore:<chart-version>)cosign sign --yesby digest, keyless, under the same workflowidentity regex as the binary archives and container image — so one
cosign verifyinvocation covers every artifact the workflowproduces
cosign verifysmoke check before the job exits.tgzonto the GitHub Release for UI-discoveryThe pushed chart version is
Chart.yaml.version(NOT the release tag)— the chart is independently versioned from the binary per RFC-0013
§chart-versioning, and
scripts/chart-appversion-check.shalreadyasserts
Chart.appVersion ↔ binary versionlockstep at release-preptime.
Job permissions:
contents: write(GitHub Release upload),id-token: write(OIDC for keyless cosign),packages: write(ghcr.io push). Helm registry login uses
GITHUB_TOKENagainstghcr.io; cosign uses the workflow's OIDC token against Fulcio.
Chart README now documents the
helm install oci://...path.docs/RELEASE-CHECKLIST.mdadds a tag-cut verification step thatpulls the chart on a fresh host and verifies the cosign signature.
Test plan
actionlint .github/workflows/*.ymlcleanpython3 -c "import yaml; yaml.safe_load(...)"clean forrelease.ymlgrep KO_DOCKER_REPO .github/workflows/release.ymlshows onlyone step-scoped assignment ([rc1-prep] Hardcode KO_DOCKER_REPO step-level for parameterless build #316 acceptance)
chart.ymlworkflow asserts (
Install,Upgrade,Uninstall,Values reference,Troubleshooting)helm pull oci://ghcr.io/tracecoreai/charts/tracecore --version <chart-version>on a fresh host (no prior
helm registry login)cosign verify oci://ghcr.io/tracecoreai/charts/tracecore:<chart-version>with the workflow identity regex
grep KO_DOCKER_REPO .github/workflows/release.yml | grep -v '#'returns exactly one line, scoped to the
ko build + pushstepNotes
helm pushparsesDigest: sha256:...from stdout (Helm 3.16 hasno
--output json); falls back to a hard error if the digest lineis missing, so a silent regression on a future Helm upgrade fails
loudly rather than skipping the cosign signing step.
setup-koaction's auto-login behavior was verified againstthe pinned commit (
d006021bd0): whenKO_DOCKER_REPOis unset atsetup-ko execution time, the action runs
ko login ghcr.ioitselfusing
GITHUB_TOKENand writes a derived value to$GITHUB_ENV.Setting
KO_DOCKER_REPOat step-level later still wins (step envCloses #316, #317.