Skip to content

fix(cosign): correct trust-list github org refs#96

Merged
namastex888 merged 1 commit into
mainfrom
fix/trust-list-org-corrections
May 9, 2026
Merged

fix(cosign): correct trust-list github org refs#96
namastex888 merged 1 commit into
mainfrom
fix/trust-list-org-corrections

Conversation

@namastex888

@namastex888 namastex888 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Two of the three hardcoded TRUSTED_IDENTITIES regexes in src/cosign/trust-list.js referenced GitHub orgs that don't host the actual release workflows. Without this fix, pgserve verify against any actually-signed pgserve binary fails — and the upcoming wave 2 G3 "manifest LOCK 1" verifier would freeze the broken values into every per-consumer manifest in perpetuity.

publisher trust-list regex actual repo status
@automagik/genie github.com/automagik-dev/genie/… automagik-dev/genie ✅ correct (untouched)
@automagik/omni github.com/automagik/omni/… automagik-dev/omni ❌ → fixed
@automagik/pgserve github.com/automagik/pgserve/… namastexlabs/pgserve ❌ → fixed

Verified org names via git remote -v in /repos/omni and /repos/pgserve. The release-publish.yml workflow's gh attestation verify --owner namastexlabs already uses the correct owner — the bug was only in the in-process verifier (used by pgserve verify and the upcoming pgserve create-app LOCK 1 path).

Why now

Surfaced during pre-flight audit of wave 4 G5 (ENGINEER-AUDIT-G5.md) while warming up on wave 2 G3 deliverables. Held wave 2 G3 dispatch: G3's manifest LOCK 1 verifier deep-clones TRUSTED_IDENTITIES at pgserve create-app time, so a wrong-regex live state would lock broken trust roots into every consumer's frozen manifest. Best to land before G3 starts coding.

Test plan

  • bun test tests/cosign/ tests/cli/trust.test.js tests/cli/verify.test.js → 83 pass / 0 fail
  • bun run lint → clean
  • bun run deadcode → clean (only pre-existing knip config hints)
  • No test pins the literal regex string (verified via grep -rn "automagik/omni\|automagik/pgserve" tests/ — only tests/cli/verify.test.js:238 references '@automagik/pgserve' which is the npm package name field, not the regex)
  • Optional: dogfood pgserve verify against a real signed binary (route to qa for smoke)

Out of scope (follow-ups, not blockers)

  • The publisher: '@automagik/pgserve' literal still lives in trust-list.js:52 even though the actual published npm package name is pgserve (no scope) per npm view pgserve. Worth a separate audit; not changed here per orchestrator's tight-scope instruction.
  • Whether v2.5.0 needs a hot-republish to ship this fix to operators already on the broken trust list (Felipe-decision; coordinates with QA Phase 1 B1).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated internal formatting in the cosign trust list configuration with no functional impact to system behavior.

Review Change Stack

…, pgserve → namastexlabs)

The hardcoded TRUSTED_IDENTITIES regexes in src/cosign/trust-list.js
referenced two GitHub orgs that don't host the actual release workflows:

  | publisher           | trust-list regex                  | actual repo          |
  |---------------------|-----------------------------------|----------------------|
  | @automagik/genie    | github.com/automagik-dev/genie/…  | automagik-dev/genie ✓|
  | @automagik/omni     | github.com/automagik/omni/…       | automagik-dev/omni ✗ |
  | @automagik/pgserve  | github.com/automagik/pgserve/…    | namastexlabs/pgserve✗|

Verified via `git remote -v` in /repos/omni and /repos/pgserve. The
release-publish.yml workflow's `gh attestation verify --owner namastexlabs`
already uses the correct owner — the bug was only in the in-process
verifier.

Impact without this fix:
  - `pgserve verify` against any actually-signed pgserve binary fails
    because cosign's --certificate-identity-regexp never matches
    `namastexlabs/pgserve` against a regex pinned to `automagik/pgserve`.
    Same for omni.
  - Wave 2 G3 ships a "manifest LOCK 1" verifier that deep-clones
    TRUSTED_IDENTITIES at create-app time. Without this fix, LOCK 1
    would freeze the broken regex into every per-consumer manifest in
    perpetuity. Operators would never reach a working verify state.

Surfaced by: pre-flight audit during ENGINEER-AUDIT-G5 cross-checking;
2/3 hardcoded trust roots had wrong-org references.

No tests pin the literal regex string; cache-token + verify tests use
the `id` field (`automagik-pgserve-release` etc.), which is unchanged.
trust-store tests use generic regexes (`^https://github.com/acme/.*$`).

Validation:
  bun test tests/cosign/ tests/cli/trust.test.js tests/cli/verify.test.js → 83/83 pass
  bun run lint → clean
  bun run deadcode → clean (only pre-existing knip config hints)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e9d9e688-6430-4c1c-a080-a69566eeb41f

📥 Commits

Reviewing files that changed from the base of the PR and between a18c849 and 935832d.

📒 Files selected for processing (1)
  • src/cosign/trust-list.js

📝 Walkthrough

Walkthrough

The PR reformats property line ordering within two entries of the hardcoded TRUSTED_IDENTITIES array in src/cosign/trust-list.js. The identityRegexp and description fields are repositioned within the automagik-omni-release and automagik-pgserve-release objects. No exported symbols, immutability guarantees, or functional behavior are altered.

Changes

Trust List Entry Formatting

Layer / File(s) Summary
Trust List Entry Reordering
src/cosign/trust-list.js
Properties within automagik-omni-release and automagik-pgserve-release entries are reordered for consistent formatting without changing constants, exports, or lookup logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through trust lists with care,
Reordering entries with gentle flair,
Names and regexps in neat array,
Still frozen and faithful come what may! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: correcting GitHub organization references in the hardcoded trust list that were pointing to wrong repositories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/trust-list-org-corrections

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 and usage tips.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the GitHub repository paths in the identityRegexp for the omni and pgserve release workflows. A review comment identifies a potential mismatch in the pgserve workflow filename, suggesting that release-publish.yml should be used instead of release.yml to ensure successful OIDC identity verification.

Comment thread src/cosign/trust-list.js
publisher: '@automagik/pgserve',
issuer: SIGSTORE_GITHUB_ACTIONS_ISSUER,
identityRegexp: '^https://github.com/automagik/pgserve/.github/workflows/release.yml@refs/tags/v.*$',
identityRegexp: '^https://github.com/namastexlabs/pgserve/.github/workflows/release.yml@refs/tags/v.*$',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The pull request description explicitly mentions that the release-publish.yml workflow in the namastexlabs/pgserve repository is used for attestations. However, the identityRegexp updated here still references release.yml. If release-publish.yml is indeed the workflow responsible for signing the binary, this regex will fail to match the OIDC identity during verification. Please verify the correct filename and update the regex if necessary.

Suggested change
identityRegexp: '^https://github.com/namastexlabs/pgserve/.github/workflows/release.yml@refs/tags/v.*$',
identityRegexp: '^https://github.com/namastexlabs/pgserve/.github/workflows/release-publish.yml@refs/tags/v.*$',

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