For a platform team that runs Kubernetes with GitOps (Argo CD or Flux) and reviews every configuration change in pull requests. You keep Git, branch protection, CODEOWNERS, and your GitOps controllers exactly as they are. Adding cub repo record-pr (or three optional inputs on the PR review GitHub Action) records each pull request's rendered configuration diff, reasons, and GitHub approvers as an immutable PullRequestReview attestation in a ConfigHub hub — self-hosted in your own cluster behind your company's OIDC or SAML single sign-on (SSO), or tried first on a local hub on your laptop.
A hub is a ConfigHub server and database that stores configuration, the reason for each value, and an immutable record of who approved each change.
You need: a GitOps repository on GitHub, and a ConfigHub hub (self-hosted in your cluster behind corporate SSO, or a local hub to try first).
| By hand | Ask your agent | |
|---|---|---|
| Sign in (humans) | cub auth login --server https://confighub.internal.example.com (via corporate OIDC/SAML SSO) | You sign in yourself; CI uses a scoped service account token (CONFIGHUB_PR_RECORDER_TOKEN) granted write access only to the audit Space |
| Create audit Space | cub space create platform-audit | "Create a platform-audit Space for recording pull request reviews." |
| Record a PR | cub repo record-pr --space platform-audit --repo ORG/REPO --pr 412 --base $BASE --head $HEAD --from-github (pulls verified APPROVED reviewers from GitHub API via GITHUB_TOKEN) | "Add hub-url, hub-space, and hub-token inputs to our confighubai/confighub-mini-plugin/review@v0 workflow so each PR is recorded in platform-audit with GitHub API approvers." |
| Backfill recent PRs | cub repo record-pr --space platform-audit --repo ORG/REPO --backfill 20 | "Backfill the last 20 merged configuration commits into Space platform-audit so audit queries work on day one." |
| Query the audit trail | cub repo record-pr --space platform-audit --list | "List the pull request configuration reviews recorded in Space platform-audit." |
Without ConfigHub: audit questions ("which PR raised ingress replicas in us-east, why, and who approved it?") mean searching editable GitHub comments and commit logs across repos by hand.
Where this grows (1:46 video): Watch the ConfigHub Trailer for multi-cluster fleet promotion, field guards, and cub unit blame alongside Argo CD, Flux, and Sveltos.
The rest of this page shows the full steps to test cub repo record-pr on a local hub, wire it into GitHub Actions against a self-hosted hub with SSO, and verify that credentials stay out of the hub.
For a platform engineer testing the pull-request audit trail locally before pointing it at a self-hosted hub.
Git, and cub with the local hub (install the local hub) or a self-hosted ConfigHub hub behind your company's SSO.
cub local start to test locally) and create an audit Space:
cub space create platform-auditcub repo record-pr --space platform-audit --repo acme/gitops-fleet --pr 412 \
--base main --head HEAD --author platform-bot --approved-by sec-lead,sre-oncall --dry-runPullRequestReview attestation:
cub repo record-pr --space platform-audit --repo acme/gitops-fleet --pr 412 \
--base main --head HEAD --author platform-bot --approved-by sec-lead,sre-oncallRunning the same command again for the same PR and head commit prints already recorded in Space platform-audit; nothing was written.
cub repo record-pr --space platform-audit --listIn GitHub Actions, pass three optional inputs to the configuration review Action:
- uses: confighubai/confighub-mini-plugin/review@v0
with:
hub-url: https://confighub.internal.example.com
hub-space: platform-audit
hub-token: ${{ secrets.CONFIGHUB_PR_RECORDER_TOKEN }}The Action passes GITHUB_TOKEN and --from-github so cub repo record-pr pulls verified APPROVED reviewers directly from the GitHub API (ignoring comment-only or superseded reviews). To deploy the hub in Kubernetes behind OIDC (Dex, Okta, Entra ID), see Self-hosting the ConfigHub hub in Kubernetes (Helm). To undo: remove those three inputs; Git and Argo CD/Flux keep working unchanged.
Never pass or print CUB_TOKEN or any secret value. When asked to check what pull requests were recorded, run cub repo record-pr --space SPACE --list or cub repo record-pr ... --dry-run. Do not create or modify audit Spaces or service accounts in a production hub unless the person explicitly asks and approves.
| Check | Result (26 November 2026) |
|---|---|
| Cluster + OIDC | charts/confighub-hub/ v0.1.0 (kind, ConfigHub v0.11.1 + PVC) alongside live Dex v2.41.1 (verified OIDC discovery, JWKS kid, RS256 ID token for priya@acme.example.com) |
--from-github & redaction | Recorded acme/gitops-fleet#412 with verified approvers sec-lead,sre-oncall (excluded COMMENTED reviewer commenter) and API_TOKEN (redacted) |
Idempotency & --backfill 3 | Re-run wrote nothing; --backfill 3 imported #411 and skipped #412 |
In-place helm upgrade | Pod replaced on same PVC; --list still returned #412 with zero data loss |
| Planted-fault unit tests | TestRecordPRToHubAndIdempotency (record-pr-duplicate), TestRecordPRRedactsCredentials (review-record-credential), TestRecordPRSkipsNonConfigAndDryRunWritesNothing, TestRecordPRBackfillRespectsLimitAndIdempotency (backfill-ignores-limit), TestRecordPRApproversFromGitHubAPI (record-pr-unapproved-reviewer) |
Show what
cub repo record-pr --dry-runwould record for the latest commit on this branch without writing anything to the hub.
Record this pull request review into Space
platform-auditand list the recorded pull requests.
This proves: a platform team can record every pull request's rendered configuration changes, reasons, and GitHub-API-verified approvers as immutable attestations in a self-hosted Kubernetes hub alongside an OIDC provider without replacing Git or Argo CD/Flux, and without sending credentials.
26 November 2026: passed end-to-end in kind (charts/confighub-hub/ v0.1.0 + Dex v2.41.1), including --from-github, --backfill 3, idempotent re-run, credential redaction, and in-place helm upgrade persistence.