Skip to content

[P2] B4.run: establish a B4 security receipt pipeline #604

Closed as not planned

Description

@blove

Disposition: not planned. The proposed additional receipt pipeline is removed from the active launch scope under the owner's publishing-simplicity directive. The historical uploader stays disabled. No replacement pipeline, consumer, release requirement or implementation is authorized by this issue. The prior proposal below is retained as a superseded discussion record, not an executable backlog.

Owner directive — publishing simplicity, 2026-09-10 UTC: Publishing is working after several days of repair. Preserve that working flow. Do not add release gates, mandatory receipts, workflows, approval steps, or publishing prerequisites. Future publishing changes should reduce complexity or improve measured efficiency/speed. Do not reopen expansion work without a new explicit request.

Follow-up to the B4.run rename merged in #595 and version update #596.

Release coordination: #597 is owned by the active release maintainer. Do not interrupt its CI, mutate the active candidate, or remove credentials it needs. Execute this issue only when its dependencies below are satisfied.

Owner: Release/security maintainer. Dependency: Active release closed; separate design and PR before any workflow activation.

Problem: The historical dependency-security receipt uploader is deliberately disabled. A new B4 receipt path needs its own verified authority chain.

Files: .github/workflows/dependency-security-receipt.yml, scripts/security/reconciliation-receipt.mjs, associated tests discovered through its imports, scripts/release/test/workflow-contracts.test.mjs, and release content-pin fixtures if execution reachability changes.

  • Write a bounded design identifying the producing workflow, repository slug/ID, candidate and artifact bindings, permissions, and verification consumer. Explain how inherited history is rejected where it could confer publication authority.
  • Add failing negative tests for wrong repository name on the inherited numeric ID, wrong workflow/candidate, and historical receipt replay, plus a positive B4 receipt case.
  • Implement the new path in a separate PR and run the applicable receipt, release-controller, and full required validation gates.
  • Activate only after those checks pass and the maintainer has a concrete reviewed workflow and receipt to assess. Never simply remove if: false from the historical uploader.

Acceptance: Fresh B4 receipts verify, forged or replayed historical authority is rejected, and the normal release remains protected. This is a separate design task; do not use this backlog entry as a complete security implementation specification.

Confirmed redirect policy — 2026-09-10 UTC: The owner explicitly chose to leave the existing redirects in place. Preserve the old-domain redirects to b4.run and GitHub repository rename redirects. This supersedes the initial no-redirect request. Runtime/package compatibility aliases remain prohibited. Record this resolved decision in the current cutover documentation under #600.

Source assessment and proposed design boundary — 2026-09-09

Read-only source assessment at c20db08 (no workflow or implementation changes): the disabled uploader already reads the current main ref from cacheplane/b4run, but its CLI baseline/sealing path, reconciliation validator, GitHub evidence reader, and publication-containment validator remain bound to the historical repository name. Changing the uploader condition alone would not produce a valid B4 pipeline.

Proposed bounded design for separate review:

  • Create an explicitly versioned B4 receipt family and a new producing workflow path, such as .github/workflows/b4-dependency-security-receipt.yml. Keep the historical workflow unconditionally disabled. Do not make a generic validator accept both names based only on repository ID.
  • Require both repository slug cacheplane/b4run and numeric ID 1210070282 from authenticated GitHub metadata. Bind every producer run to the reviewed workflow path/revision, event, run ID, attempt and head SHA. A matching inherited numeric ID alone is insufficient.
  • Bind receipt bytes to the exact reviewed PR base/head, merge SHA, observed main SHA, lockfile digest, audit expectation/evidence digests, and verification-run identities. Distinguish a dependency reconciliation observation from a release candidate; a dependency receipt must never itself grant npm publication authority. Any future release consumer needs its own explicit candidate and manifest binding.
  • Use a fresh B4 baseline and B4 package inventory. Historical schema-1 receipts and snapshots remain evidence only and must fail the new authorization path, including when wrapped in a new upload or paired with the inherited repository ID.
  • Preserve bounded canonical JSON, compressed-input limits, exact digest checks, sealed write-once output and an exact artifact member allowlist. Consumers must verify artifact ID/digest plus producer run/attempt/workflow/head rather than trusting an artifact name or uploader manifest alone.
  • Keep the uploader at contents: read with no npm credential, write-scoped repository token or id-token: write. Separate the collector's minimum API read permissions from upload permissions. Treat externally supplied receipt content as untrusted; an authenticated dispatcher is not proof that its claims are true.
  • Establish an explicit read-only verification consumer alongside the new schema before activation. The consumer should emit a verified B4 reconciliation result; connecting that result to release policy is a separate reviewed change. No existing release trust boundary is silently widened.

Implementation map to resolve in the reviewed specification:

Current code: scripts/security/dependency-evidence.mjs, dependabot-reconcile.mjs, reconciliation-receipt.mjs, reconciliation-seal.mjs, reconciliation-transport.mjs, github-evidence.mjs, publication-containment.mjs, and nested audit/Dependabot schemas. Existing regression suites: test/security-dependencies/dependabot-reconcile.test.ts, github-evidence.test.ts, publication-containment.test.ts, and scripts/release/test/workflow-contracts.test.mjs. Keep historical readers isolated; extract shared byte/transport primitives only where they carry no identity or publication authority.

Required proof cases before activation: a valid fresh B4 receipt; wrong slug with matching numeric ID; wrong ID with matching slug; wrong workflow/revision/event/head/run attempt; mismatched base/head/merge/observation or lockfile; replayed old baseline/receipt under a new artifact; artifact digest/member substitution; oversized or noncanonical payload; moved main; and a receipt incorrectly presented as release publication authority. Preserve existing negative tests for the historical disabled uploader.

This is a proposed design boundary, not an approved implementation specification. Next: resolve exact schema/consumer contracts, write failing proof cases, implement in a separate PR, run focused security tests and pnpm test:release-controller, then the repository's full required validation. Activation requires a concrete reviewed workflow and verified sample receipt. Nothing was activated or dispatched during this assessment.

Activity

  1. added this to the B4.run launch completion milestone on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions