Skip to content

security(release): require npm release tag to match protected main tip - #81

Draft
Pavithran-R-A wants to merge 3 commits into
mainfrom
fix/production-release-main-tag-binding-20261110
Draft

Pavithran-R-A wants to merge 3 commits into
mainfrom
fix/production-release-main-tag-binding-20261110

Conversation

@Pavithran-R-A

Copy link
Copy Markdown
Owner

Production hardening (no publication performed)

The release workflow previously checked the package version, release tag and checked-out GITHUB_SHA, but did not verify that the tag resolved to the current protected main revision. A published GitHub Release pointing at a different commit could therefore reach the npm OIDC publication step if its source tests passed.

This change fails closed unless the release event, tag ref, package repository, peeled local tag, checkout SHA, and read-only remote main tip all agree. The remote is read directly from the expected HTTPS GitHub repository, not the checkout's configurable origin; network or malformed Git results fail without printing child stderr. The README/releasing checklist now identifies this additional publication invariant.

Added executable negative controls for wrong event/ref, wrong tag, wrong repository, wrong GitHub SHA, stale/unrelated commit, malformed/missing/duplicate remote response. Existing publication and credential policies remain intact.

Safety: This is a draft PR for review. No npm package, GitHub Release, BharatCode model call, customer PR or remote patch was published. It cannot by itself qualify the product for production: current-source real-model test, 10-task benchmark, external draft-PR publication, registry bootstrap/provenance, and Docker-host matrix still need independent proof.

Required to merge: all six Node22/24 Linux/Windows/macOS CI jobs, 8/8 scripted customer journeys, security review, and operator approval. Do not bypass branch protections.

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