Skip to content

fix(identity): publish a verified Dex security distribution - #5814

Queued
devantler wants to merge 5 commits into
mainfrom
codex/dex-image-security-5811
Queued

devantler wants to merge 5 commits into
mainfrom
codex/dex-image-security-5811

Conversation

@devantler

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agentic Engineer

Why

The shared sign-in broker needs a source-bound security correction before fresh adoption, including the portal's dedicated broker.

What

Build and publish a minimal, reviewed distribution with the dependency correction and verified secure connections. Keep runtime adoption as a separate reviewed change.

Part of #5811

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Evaluation at a4efba7c3861c47e870c6ef5c181558f6efba1d8, based on current main 84977ddd692110a9d7a1f9bc728531d085bb75e9:

  • Root-cause dependency correction is generated by Go and confined to the exact upstream release, with independent patch replay and a fixed patched-tree check. The selected dependency and scanner releases pass the normal age policy.
  • The complete Platform root Go suite passed before the base advance. After integration, the new base's 12 module-guard controls, all 11 module tidiness checks and changed merge-heal regressions pass. ShellCheck, Actionlint and the new command's vet/tests pass.
  • Actual upstream command/server/memory-store/OIDC tests pass with normal CGO. The new checker has observed RED controls for unexamined reports, new findings and changed primary advisory metadata. Its native paired control reaches the actual weaker-protocol check; SQLite, allowed/refused HTTPS and gRPC handshakes, certificate reload, wrong CA and wrong hostname controls pass.
  • Repeated native execution exposed a transient SQLite-journal/certificate-watch collision. Certificates and database files now occupy separate fixture directories; ten full repeated controls pass. Endpoint reservations and bounded fictional failure diagnostics are retained. Both earlier failed fixture attempts remain separate adverse evidence.
  • Linux workflow 41602208351/1 completed the actual musl-linked distribution build, scanner/native controls, non-root read-only container execution and packaged-byte recheck. Its publication job correctly stayed skipped on this PR. Wider CI remains a separate gate.

This is evaluation evidence, not an independent review, promotion, deployed adoption or portal activation. Raw scanner details remain private; the specific historical disposition is supported by primary ranges, source-fix ancestry and actual executable behavior. #5811 retains signed publication/admission, digest adoption and the real broker path; business-site #491 retains its dedicated customer scope.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 3, 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 Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 48 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7d38b1b and 2b998a5.

Files selected for processing: 9
  • .github/workflows/publish-dex-security-image.yaml
  • k8s/bases/infrastructure/controllers/dex/DexSecurity.Dockerfile
  • k8s/bases/infrastructure/controllers/dex/IMAGE-NOTICE
  • k8s/bases/infrastructure/controllers/dex/README.md
  • k8s/bases/infrastructure/controllers/dex/dex-v2.46.1-network.patch
  • scripts/build-dex-security-image.sh
  • scripts/check-dex-binary/main.go
  • scripts/check-dex-binary/main_test.go
  • scripts/check-dex-binary/workflow_test.go
Walkthrough

The change adds a patched, source-built Dex image and checks its executable, packaged files, and TLS behavior. A GitHub Actions workflow builds and verifies an image archive, then publishes that same archive on pushes to main with an SBOM, signature, and attestations. The documentation describes the image contents, admission checks, and the separate steps required to adopt the image at runtime.

Possibly related issues

Merge Risk: Moderate · previous review a4b6d

Document the workflow permissions and include all identified inputs in its triggers before merging; otherwise the lint gate can fail, and input-only changes can go unverified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: publishing a verified Dex security distribution. The changeset adds a build script, a Dockerfile, a verify/publish workflow, a dependency patch bumping golang.org/x/ne…
Description check Passed The description states the purpose: a source-bound security correction for the shared sign-in broker, delivered as a minimal, reviewed distribution with a dependency correction and verified secure con…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: publishing a verified Dex security distribution. The changeset adds a build script, a Dockerfile, a verify/publish workflow, a dependency patch bumping golang.org/x/net to v0.60.0, and a binary checker that performs TLS and certificate validation. The title's conventional-commit 'fix(identity)' scope and the 'verified' wording fit the change. It is concise, specific, and free of file lists or vague terms.

Full details: Description check

Explanation

The description states the purpose: a source-bound security correction for the shared sign-in broker, delivered as a minimal, reviewed distribution with a dependency correction and verified secure connections. Runtime adoption is deferred to a separate change. These points match the changeset, which adds the Dex image build, the golang.org/x/net bump, and the TLS checks. The description is brief but specific enough to relate to the changes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 14 functions across 4 files. (5 skipped: 5 unsupported.)

Resolution

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

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 84977dd and a4b6dec.

Files selected for processing: 9
  • .github/workflows/publish-dex-security-image.yaml
  • k8s/bases/infrastructure/controllers/dex/DexSecurity.Dockerfile
  • k8s/bases/infrastructure/controllers/dex/IMAGE-NOTICE
  • k8s/bases/infrastructure/controllers/dex/README.md
  • k8s/bases/infrastructure/controllers/dex/dex-v2.46.1-network.patch
  • scripts/build-dex-security-image.sh
  • scripts/check-dex-binary/main.go
  • scripts/check-dex-binary/main_test.go
  • scripts/check-dex-binary/workflow_test.go

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: **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/controllers/dex/dex-v2.46.1-network.patch
  • k8s/bases/infrastructure/controllers/dex/DexSecurity.Dockerfile
  • k8s/bases/infrastructure/controllers/dex/IMAGE-NOTICE
  • k8s/bases/infrastructure/controllers/dex/README.md
Source excerpt: Resources under `k8s/bases/infrastructure/` are **component-folder-first**: a component's HelmRelease/HelmRepository and its own CRs live together in a folder named after the component — `controllers//` in the con...

CodeRabbit inference engine (AGENTS.md)

Files:

  • k8s/bases/infrastructure/controllers/dex/dex-v2.46.1-network.patch
  • k8s/bases/infrastructure/controllers/dex/DexSecurity.Dockerfile
  • k8s/bases/infrastructure/controllers/dex/IMAGE-NOTICE
  • k8s/bases/infrastructure/controllers/dex/README.md
golangci-lint (2.14.0)
scripts/check-dex-binary/workflow_test.go

[medium] 46-46: G204: Subprocess launched with a potential tainted input or cmd arguments

(gosec)

scripts/check-dex-binary/main_test.go

[error] 17-17: Error return value of listener.Close is not checked

(errcheck)

[error] 26-26: Error return value of other.Close is not checked

(errcheck)

[error] 24-24: net.Listen must not be called. use (*net.ListenConfig).Listen

(noctx)

scripts/check-dex-binary/main.go

[error] 96-96: Error return value of f.Close is not checked

(errcheck)

[error] 97-97: Error return value of os.Remove is not checked

(errcheck)

[error] 140-140: Error return value of f.Close is not checked

(errcheck)

[error] 338-338: Error return value of log.Close is not checked

(errcheck)

[error] 380-380: Error return value of resp.Body.Close is not checked

(errcheck)

[medium] 100-100: G204: Subprocess launched with variable

(gosec)

[medium] 113-113: G304: Potential file inclusion via variable

(gosec)

[medium] 136-136: G304: Potential file inclusion via variable

(gosec)

[medium] 256-256: G304: Potential file inclusion via variable

(gosec)

[high] 331-331: G703: Path traversal via taint analysis

(gosec)

[medium] 341-341: G204: Subprocess launched with variable

(gosec)

[error] 372-372: (*net/http.Client).Get must not be called. use (*net/http.Client).Do(*http.Request)

(noctx)

[error] 424-424: crypto/tls.DialWithDialer must not be called. use (*crypto/tls.Dialer).DialContext with NetDialer

(noctx)

[error] 446-446: crypto/tls.DialWithDialer must not be called. use (*crypto/tls.Dialer).DialContext with NetDialer

(noctx)

[error] 464-464: net.Listen must not be called. use (*net.ListenConfig).Listen

(noctx)

[error] 480-480: crypto/tls.DialWithDialer must not be called. use (*crypto/tls.Dialer).DialContext with NetDialer

(noctx)

[error] 492-492: ST1005: error strings should not be capitalized

(staticcheck)

zizmor (1.30.1)
.github/workflows/publish-dex-security-image.yaml

[warning] 95-95: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)

Additional comments: 9
k8s/bases/infrastructure/controllers/dex/dex-v2.46.1-network.patch: 1

1-14: LGTM!

scripts/check-dex-binary/main.go: 1

1-510: LGTM!

scripts/check-dex-binary/main_test.go: 1

1-105: LGTM!

scripts/build-dex-security-image.sh: 1

1-100: LGTM!

k8s/bases/infrastructure/controllers/dex/DexSecurity.Dockerfile: 1

1-11: LGTM!

k8s/bases/infrastructure/controllers/dex/IMAGE-NOTICE: 1

1-18: LGTM!

k8s/bases/infrastructure/controllers/dex/README.md: 1

8-46: LGTM!

.github/workflows/publish-dex-security-image.yaml: 1

1-93: LGTM!

Also applies to: 97-155

scripts/check-dex-binary/workflow_test.go: 1

1-97: LGTM!

Comment thread scripts/check-dex-binary/main.go Resolved
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Re-evaluated a4b6dec7c1cc2719e9fe2306330c05d618f80988 after addressing both review findings:

  • CI 41611639250/1 and Linux image verification 41611639239/1 completed successfully. All 58 native contexts and eight matching workflows are settled; the publication job correctly stayed skipped on this PR.
  • The actual producer/consumer workflow regression was RED for a publish-only retry before repair. Both partial and full retry cases now select the producing job's exact archive. Hash and image identity checks remain required.
  • The previous certificate check incorrectly admitted a controlled stale-certificate build (RED). The repaired control requires both endpoints to present the renewed leaf under distinct trust, repeats the protocol/CA/hostname controls, and rejects retired trust. Linux CI builds this adversarial control separately, restores the source, then compiles the shipping executable.
  • Independently downloaded the resulting native image artifact (13219671231), verified its archive hash, image configuration and all 16 layers, inspected the packaged executable and passive source offer, and confirmed the source contains the restored upstream reloader. The actual executable still binds the reviewed compiler, upstream revision and dependency correction. Fresh scanner output is retained privately.
  • Assessed the ancillary static-analysis report against the implementation. Its file/process warnings concern explicitly selected build tools and generated disposable fixture paths, not request-controlled paths or a deployed service boundary. The fixture has bounded process, HTTP and TLS operations. The remaining reported close/context/style and documentation-permission observations do not invalidate these controls; no check was disabled or waived.

This is evaluation evidence, not substantive review, signed main publication, deployed adoption or portal activation. Both original review threads are resolved. #5811 and business-site #491 retain their remaining publication/admission/adoption obligations.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Full review finished.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Evaluated signed head 2b998a52af4f99ffe8836b494be93bf8273b4ff1, integrated with main 7d38b1bce1f0612f84a9df1d1b115e7abab3aa3e:

  • The full root Go suite passes across 90 packages. All 11 tracked modules pass the actual tidiness command. Native TLS-floor, real certificate-renewal and deliberately stale-certificate controls pass in this round; the complete checker package took 6.445s.
  • Six parsed-workflow controls were independently RED for omitted checker-module and signing-installer inputs, then GREEN after fixing both event filters. The producing-attempt archive retry controls remain green. Publication permissions now document their consumers without changing the grants.
  • Actionlint, ShellCheck, changed-package vet, diff checks and installed Zizmor 1.31.1 offline validation pass. The ancillary file/process/context/style report was assessed against the bounded build-tool and disposable-fixture boundaries; no scanner or gate was disabled.
  • Hosted CI 41628212290/1 and native Linux image verification 41628212626/1 succeeded. The complete current-head census contains 58 settled successful/skipped contexts and eight successful workflows. The PR's image-publication job correctly stays skipped; this is not main publication or deployed adoption.
  • All four review threads are resolved. Fix confirmations and their empty reply-review containers are not a green substantive review of this head.

The portable review cycle is now at the second repaired head; any further findings must be assessed against the complete set under the convergence rule. #5811 and business-site #491 retain actual signed publication/admission/adoption. Portal activation remains separate and disabled.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 48 minutes.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

CodeRabbit explicitly declined the current-head full-review request at 11:47:02 UTC: its included allowance is exhausted, with a stated 48-minute recovery window. Primary response: #5814 (comment). With the minute-window safety margin, do not retry before 12:36:02 UTC. No usage-based billing or credit reset is authorized.

The current-head no-gate guard returns ADMIT; this is not a review verdict. The ordered sequence advances to Codex, preserving all review and merge gates.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T11:53:40.856612Z 2b998a5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 2b998a52af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Readiness at 2b998a52af4f99ffe8836b494be93bf8273b4ff1, base 7d38b1bce1f0612f84a9df1d1b115e7abab3aa3e:

  • All eight exact-head workflow runs have succeeded, including CI and the actual Linux distribution verification. The latter built the real shipping executable and separate adverse control, exercised TLS and certificate renewal, scanned the resulting distribution, and retained its verified archive; PR publication was correctly skipped. Native checks are complete; CodeRabbit is neutral because of its explicitly reported allowance limit. Configured native code_quality remains UNVERIFIED, not waived; GitHub reports CLEAN.
  • Full comments, reviews, inline findings and four native threads were re-read: every reported finding is addressed and all four threads are resolved. Ordered review progressed only after CodeRabbit's explicit refusal. Codex's substantive current-head review is green, with its completed exact-head summary reporting no findings.
  • Actual native host controls independently observed allowed TLS, rejected lower protocols and incorrect trust/hostname, genuine certificate replacement, and refusal of the deliberately stale-certificate executable. All 90 root Go packages, all 11 module-tidy checks, six RED-before/GREEN-after workflow-selection controls and changed-file lint passed. This is distribution readiness; no production adoption or portal login is claimed.

Fresh holder read reports none, the isolated checkout is owned by this invocation and clean, and the reviewed head is unchanged. Promote this source-only prerequisite; keep production/queue admission separate while the independent platform recovery is unfinished. No health or deployment gate is waived.

@devantler
devantler marked this pull request as ready for review November 3, 2026 12:14
@devantler

devantler commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

Blocker: none

Cleared 2026-11-03: Fresh current live-health read exits 0 (PLATFORM-HEALTH=OK); the recovery outcome has cleared. Current exact head 2b998a5 retains complete green native/workflow checks, resolved findings and its applicable Codex green. Continue normal head-pinned queue admission.

Previous record (historical):

> 🤖 Generated by the Agentic Engineer

<!-- pr-blocker-record -->

**Blocker:** current-main production recovery reaches verified healthy state | outcome | last-verified 2026-11-03: Source CI and current-head substantive Codex review are green at 2b998a52af4f99ffe8836b494be93bf8273b4ff1; all four threads are resolved and the PR is promoted. Independent current-main recovery run 41617563309 ended unsuccessfully; a separate normal merge-group run 41634010849 is active. Fresh live health is UNHEALTHY. Queue admission remains held; no recovery takeover, cancellation or protection override.

@devantler devantler removed the blocked label Nov 3, 2026
@devantler
devantler added this pull request to the merge queue Nov 3, 2026
Any commits made after this event will not be merged.

This branch has not been deployed

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

Labels

None yet

Projects

Status: 🫴 Ready

Development

Successfully merging this pull request may close these issues.

1 participant