Skip to content

fix(security): harden scope, trust, and release boundaries#471

Merged
jeremi merged 3 commits into
mainfrom
codex/fix-high-findings-20260725
Jul 25, 2026
Merged

fix(security): harden scope, trust, and release boundaries#471
jeremi merged 3 commits into
mainfrom
codex/fix-high-findings-20260725

Conversation

@jeremi

@jeremi jeremi commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • enforce uniqueness across effective Registry API authorization scopes and prevent attribute-release privileges from aliasing lower-sensitivity scopes
  • make a configured Relay PostgreSQL state-plane root certificate an exclusive trust anchor while preserving normal system trust when no custom root is configured
  • stop executing downloaded release binaries in the GitHub publication job that holds contents: write and OIDC permissions
  • run release-capsule backfills from exact default-branch code through repository_dispatch, with checkout credentials disabled

Component reviews

The final integration keeps the original three signed commits while each independent owning area has a narrow review unit:

The component PRs are review-only stacks and should not be merged separately. This PR remains the single final merge to main after those reviews complete.

Why

A security review identified four boundary failures: authored scopes could collapse distinct capabilities, a configured private database root was additive to system trust, downloaded build artifacts were executed in a privileged publication job, and the backfill workflow could run branch-selected workflow code with write authority.

The changes apply the smallest controls at those boundaries. They do not broadly restrict reviewed project configuration or add unnecessary operator approvals.

User and operator impact

  • project authors receive actionable scope-collision diagnostics
  • multiple attribute-release profiles may still intentionally share the entity-bound release scope
  • Relay deployments that omit root_certificate_path continue using the host system trust store
  • capsule backfill moves from the GitHub UI to the documented one-command gh api invocation so privileged implementation always comes from the default branch
  • release binary version validation remains in read-only producer jobs

Validation

  • cargo fmt --all -- --check
  • cargo test --locked -p registryctl (291 passed)
  • cargo clippy --locked -p registryctl --all-targets -- -D warnings
  • cargo test --locked -p registry-relay --lib (719 passed, 6 ignored)
  • cargo clippy --locked -p registry-relay --lib --tests -- -D warnings
  • just ci-preflight in crates/registry-relay
  • python3 -m unittest release/scripts/test_registry_release.py (66 passed)
  • python3 -m unittest release/scripts/test_check_release_source_model.py (12 passed)
  • actionlint .github/workflows/release.yml .github/workflows/release-capsule-backfill.yml
  • git diff --check

Two independent implementation reviews found no actionable code issue. The component PRs provide the requested owning-area review split.

jeremi added 3 commits July 25, 2026 10:31
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69311802dc

ℹ️ 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".

Comment thread .github/workflows/release-capsule-backfill.yml
Comment thread crates/registry-relay/src/state_plane/runtime.rs
@jeremi
jeremi enabled auto-merge (rebase) July 25, 2026 03:52
@jeremi
jeremi merged commit 30a0f4b into main Jul 25, 2026
27 checks passed
@jeremi
jeremi deleted the codex/fix-high-findings-20260725 branch July 25, 2026 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant