Skip to content

fix(khoist): approve its verified application publisher - #5381

Closed
devantler wants to merge 2 commits into
mainfrom
codex/khoist-publisher-5377-01a1783e
Closed

devantler wants to merge 2 commits into
mainfrom
codex/khoist-publisher-5377-01a1783e

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The current data-product publisher is not approved for this deployment, preventing the portfolio's verified publication records from updating. This also holds the portal deployment preparation open.

What

Approve the reviewed publisher for the data-product service alone and refresh the observed publication records. Preserve the existing approval boundaries for other products.

Fixes #5377
Part of #5267

@devantler

devantler commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Signed head e065353185c852a4242618182d9485b1e4888a70 implements #5377, the live blocker of #5361's observation refresh. The six-consumer generator had refused KHoist's current immutable publisher and wrote no partial output. The reviewed workflow changes its pinned runner-hardening release; its checked-out prebuilt helper adds bounded public-read retries while retaining original publication/source/signature joins. The complete helper closure and hardener patch were inspected, rather than relying on release titles.

The new publisher is approved only for the exact KHoist consumer and image repository. Its dedicated admission attestor covers ordinary, init and ephemeral containers; its first matching node rule precedes the unchanged shared app catch-all. The prior maintained publisher and original full-commit compatibility remain accepted. The obsolete maintained revision is retired for this consumer only, after independent signature verification of both its actual deployed image and current source manifest succeeded using the retained alternatives. Other consumers and the Tenant constructor retain their original authority.

The new complete-policy CEL/first-match controls were RED before implementation and pass after it; wrong issuer/owner, mutable/unapproved revisions, retired revision, lookalikes and child repositories refuse the new authority. Full affected Go race tests and vet, inventory regressions, canonical-approval and approved-revision guards, source-upgrade, generator-output and publisher-regeneration controls pass. Both static manifest validations exited zero and include the changed policy and KHoist layer. Their existing offline namespace-label and chart-render limitations remain explicit; they are not a live rollout or universal Helm proof. No check configuration or threshold was relaxed.

The genuine unchanged observation generator and writer completed for all six consumers, then repeated with byte-identical outputs. They observe #5364's already verified business-site source and convert its pending upgrade into the existing published-binding form; application reconciliation remains disabled. This PR does not activate a portal, replace running applications or change public routing. Fresh hosted CI and substantive exact-head review remain required.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Signed correction 8f4f4d21bba83971271e2d2359f3d9c2c6743aca completes the publisher approval checks.

CI 40352688501 at the earlier head remains FAILED. Its complete read found five failed jobs from three underlying omissions: the reviewed source matcher's authorization-ledger fingerprint, the two genuine additional shared-publisher matcher entries, and verifier fixtures that still modeled nine routes/attestors. No substantive provider review was requested on that failed head.

The approval ledger now changes only KHoist's exact OCIRepository fingerprint, with the observed before/after edit documented beside earlier approvals. The matcher inventory requires both the unchanged shared matcher and the new dedicated one. The credential-refresh fixture requires all ten attestors plus KHoist's exact issuer, signer and repository routing; the liveness fixture requires all ten ordered routes and adds explicit missing-KHoist/wrong-signer refusals. No validator, scan scope, required job or threshold is disabled.

The complete credential-refresh Go race suite passes (235 seconds), as does the full authorization race suite (147 seconds), vet, the actual pinned-renderer authorization validator, the complete liveness regression and all 112 shared-matcher guard controls. Earlier complete-policy CEL, source-upgrade and genuine six-consumer generation evidence remains scoped to the unchanged implementation. Fresh hosted CI and substantive exact-head review are still required. This remains deployment preparation, not portal activation.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between f45da03 and 8f4f4d2.

Files ignored due to path filters: 3
  • scripts/publish-workflow-approved-revisions.identities.tsv is excluded by !**/*.tsv
  • scripts/publish-workflow-canonical-approvals.tsv is excluded by !**/*.tsv
  • scripts/shared-publish-workflow-matchers.tsv is excluded by !**/*.tsv
Files selected for processing: 11
  • k8s/bases/infrastructure/cluster-policies/best-practices/verify-app-images.yaml
  • k8s/providers/hetzner/apps/khoist-documentation/oci-repository.yaml
  • scripts/canonical-tenant-source-bindings.json
  • scripts/tests/arc-staging/khoist_publisher_test.go
  • scripts/tests/refresh-flux-ghcr-auth/fake_kubectl_test.go
  • scripts/tests/test-inventory-first-party-image-signatures.sh
  • scripts/tests/test-publish-workflow-canonical-approvals.sh
  • scripts/tests/test-validate-image-verifier-liveness.sh
  • scripts/validate-eks-ci-role-policy/approved-surface-history.md
  • scripts/validate-eks-ci-role-policy/approved-surface.txt
  • talos/cluster/verify-first-party-images.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 2
Source excerpt: **Talos machine-config patches** (`talos/`, `talos-local/`) follow the same spirit: **one YAML document per file** and intent-describing `‹verb›-‹purpose›.yaml` names (e.g.

CodeRabbit inference engine (AGENTS.md)

Files:

  • talos/cluster/verify-first-party-images.yaml
Source excerpt: **Put a change in the layer that matches its scope** — edit `k8s/bases/` when it should hold for **every consumer of that resource**; add an overlay `patches/` fragment only for a genuine per-consumer difference.

CodeRabbit inference engine (AGENTS.md)

Files:

  • k8s/bases/infrastructure/cluster-policies/best-practices/verify-app-images.yaml
  • k8s/providers/hetzner/apps/khoist-documentation/oci-repository.yaml
Learnings: 1
Learning: 2026-08-06T20:59:46.493Z
Learnt from: devantler
Repo: devantler-tech/platform PR: 0
File: :0-0
Timestamp: 2026-08-06T20:59:46.493Z
Learning: For this platform's GitHub Actions keyless Cosign signatures, the measured OIDC issuer is `https://token.actions.githubusercontent.com`. The issuer regex in `ksail.prod.yaml` and `k8s/providers/hetzner/infrastructure/controllers/flux-instance/flux-instance.yaml` must use this exact domain; `token.actions.githubusercontent.com` is a different domain and does not match the certificate issuer.

Applied to files:

  • k8s/bases/infrastructure/cluster-policies/best-practices/verify-app-images.yaml
golangci-lint (2.14.0)
scripts/tests/arc-staging/khoist_publisher_test.go

[error] 59-59: right hand must be only type assertion

(forcetypeassert)

Additional comments: 11
k8s/bases/infrastructure/cluster-policies/best-practices/verify-app-images.yaml: 1

78-86: LGTM!

Also applies to: 192-194, 220-230

talos/cluster/verify-first-party-images.yaml: 1

194-199: LGTM!

scripts/tests/arc-staging/khoist_publisher_test.go: 1

1-79: LGTM!

scripts/tests/refresh-flux-ghcr-auth/fake_kubectl_test.go: 1

1203-1203: LGTM!

Also applies to: 1212-1212, 1216-1216, 1241-1242, 1258-1259, 1264-1266, 1316-1320, 1323-1323

scripts/tests/test-inventory-first-party-image-signatures.sh: 1

271-271: LGTM!

Also applies to: 274-274, 277-277

scripts/tests/test-validate-image-verifier-liveness.sh: 1

167-167: LGTM!

Also applies to: 226-227, 253-253, 298-299, 358-378

k8s/providers/hetzner/apps/khoist-documentation/oci-repository.yaml: 1

18-18: LGTM!

scripts/validate-eks-ci-role-policy/approved-surface-history.md: 1

3864-3888: LGTM!

scripts/validate-eks-ci-role-policy/approved-surface.txt: 1

427-427: LGTM!

scripts/tests/test-publish-workflow-canonical-approvals.sh: 1

577-582: LGTM!

Also applies to: 593-594, 609-609, 641-641

scripts/canonical-tenant-source-bindings.json: 1

8-8: LGTM!

Walkthrough

The change adds a dedicated publishkhoist verification route for exact KHoist image references in admission and Talos rules, with tests for publisher identity and route isolation. It also updates the KHoist OCIRepository publisher approval, approval records, canonical approval tests, and the business-site source-binding record.

Possibly related issues

Possibly related PRs

Priority: Normal

Merge Risk: Minimal · up to 8f4f4

The KHoist publisher approval and image-verification routes are consistent. No merge-blocking issue is established; normal validation remains appropriate before merge.

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 1 error · 1 warning

Check name Status Explanation Resolution
Linked Issues check Error Issue #5377 is the only active direct target, so its coding requirements apply. #5267 is parent context for observation follow-through and was not needed for this verdict. This assessment uses the sup… Restrict the KHoist rule in talos/cluster/verify-first-party-images.yaml to exact revisions. Use the same two approved publish-app.yaml revisions as the publishkhoist attestor. Remove the any-40-hex actions-repository pattern. If an actions…
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Description check Passed The description explains that the pull request approves the KHoist publisher, refreshes publication records, and preserves approval boundaries. These goals match the changeset.
Title check Passed The title clearly identifies the KHoist publisher approval, which is the main change in the pull request.
Out of Scope Changes check Passed The visible changed files relate to the KHoist publisher approval. They cover the khoist-documentation OCIRepository identity, the k8s and Talos verification rules for ghcr.io/devantler-tech/khoist, t…
Full details: Out of Scope Changes check

Explanation

The visible changed files relate to the KHoist publisher approval. They cover the khoist-documentation OCIRepository identity, the k8s and Talos verification rules for ghcr.io/devantler-tech/khoist, the approval record and digest, the business-site source binding status, and tests for those rules. The Talos revision wildcard is an in-scope defect under #5377, not an unrelated change.

The product-docs expectations and the node-pull selector change in test-publish-workflow-canonical-approvals.sh touch another product's test profile. They concern the shared publish-app retired and maintained revision checks. No behavior change for other products is shown in the supplied evidence, so no unrelated change is demonstrated.

Three ignored TSV files are excluded from review and their contents cannot be inspected. Their scope is inferred from file names only. No unrelated change is demonstrated from visible evidence.

Full details: Linked Issues check

Explanation

Issue #5377 is the only active direct target, so its coding requirements apply. #5267 is parent context for observation follow-through and was not needed for this verdict. This assessment uses the supplied summary only. No source inspection was available.

Met or partly evidenced:

  • [#5377] The OCIRepository for khoist-documentation moves its Cosign identity to publish-app.yaml@2df24600b1113e291b87e300b91e59c160446134. The approved-surface digest and ledger fingerprint change to match.
  • [#5377] k8s/bases/infrastructure/cluster-policies/best-practices/verify-app-images.yaml adds a publishkhoist attestor. It accepts the shared publish-app.yaml identity only at the two specified revisions. A routing rule sends ghcr.io/devantler-tech/khoist tagged and digest references to that attestor. Other first-party images keep their existing signer paths.
  • [#5377] approved-surface-history.md records acceptance of 2df24600, retention of 467f0758, retirement of 0c7b6c35, and the review controls.
  • [#5377] Tests cover exact KHoist repository matching, refusal of incorrect certificate identities, refusal when the ordinary application signer is used, and first-matching node-rule behavior.

Unmet:

  • [#5377] The acceptance criteria require exact consumer/workflow/repository/revision approval with no wildcard. talos/cluster/verify-first-party-images.yaml adds a KHoist rule that accepts keyless publish-app.yaml signatures for any 40-character lowercase hexadecimal commit in the actions repository. That is a revision wildcard. It also conflicts with the k8s publishkhoist attestor, which accepts only the two specified revisions.

Not established from the supplied evidence:

  • scripts/publish-workflow-approved-revisions.identities.tsv, scripts/publish-workflow-canonical-approvals.tsv, and scripts/shared-publish-workflow-matchers.tsv are excluded from review. Their approval bindings and maintained matcher generation cannot be checked.
  • The executable publisher and helper review content is not in the summary. Only the approval records are described.
  • The business-site binding change in canonical-tenant-source-bindings.json (published-upgrade to published-binding) needs the actual Ready/SourceVerified proof. That proof is not in the supplied evidence.
  • The complete six-consumer observation refresh, stability checks, and hosted CI are reported by the author but are not shown in the code evidence.

Resolution

Restrict the KHoist rule in talos/cluster/verify-first-party-images.yaml to exact revisions. Use the same two approved publish-app.yaml revisions as the publishkhoist attestor. Remove the any-40-hex actions-repository pattern. If an actions-repository revision is required, list that exact commit. Add a refusal test for an unapproved actions-repository commit. Then provide the ignored approval and matcher TSV contents, or equivalent evidence, and the business-site Ready/SourceVerified proof for reassessment.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Superseded by verified upstream recovery; this PR will not merge. KHoist #500 merged as fa5a13e772dc2cc26db784170a31aa3624620235 and restored its already approved publisher 467f07582436a26b62cf4aa756423512f85ba0c0. Platform #5378 then merged the genuine observation refresh as signed ef018aa140a64f7cf3e0c112b591bd9933536108. Its main validation succeeds and its business-site published binding records sha256:2f43bf60c87e373ab99f9fc08f187287d9526b3f1b3212b6234e2ae80b9c5e82, matching the independently observed Ready/SourceVerified source.

The added publisher approval, dedicated image matchers and related ledger/fixture changes are no longer needed for this delivery. They remain unmerged and are withdrawn with this PR, including the legacy-pattern concern raised by the selected provider's linked-issue check. The current deployed approval set remains in force. No review gate is waived, and no obsolete permission change is being promoted.

Issue #5377 is superseded rather than completed as an added approval. #5361's already merged preparation and now merged observation follow-through are assessed separately against actual source acceptance. Portal identity admission and activation remain open under the business-site issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Approve KHoist's current immutable application publisher

1 participant