Release Bex Security
Publish one immutable @bex-co/bex-security version from main. A successful
release has the same version in sdk/typescript/package.json, npm, the
bex-v<version> Git tag, and the GitHub release.
Preconditions
Read the repository AGENTS.md instructions and review all material that
will become public.
Require a clean worktree on main. Never stash, discard, amend, rebase a
published commit, or force-push.
Fetch origin and the canonical openai/codex-security upstream. Bring
local main to origin/main with a fast-forward only.
Confirm sdk/typescript/package.json names
@bex-co/bex-security, points to the Bex repository, and retains
codex-security only as a compatibility bin.
Authenticate to the public npm registry. When .env provides NPM_TOKEN,
load it without printing it and pass it only through the process
environment:
env "npm_config_//registry.npmjs.org/:_authToken=$NPM_TOKEN" npm whoami --registry=https://registry.npmjs.org
Do not create or commit an npm credentials file.
Choose The Version
Resolve the merged upstream baseline with git merge-base main upstream/main.
Read the upstream package version from that commit rather than claiming an
unmerged upstream release.
- Versions are
<upstream-version>-bex.<release-number>.
- Use
.1 for the first Bex release on a new upstream version.
- Otherwise increment the greatest published Bex release number for that exact
upstream version.
- Never reuse, overwrite, deprecate, or unpublish a version.
- If npm already contains the intended version, enter recovery mode: do not
bump or publish it again; verify the archive and complete only missing Git or
GitHub release metadata.
Update these fields together:
version
bex.upstreamVersion
bex.upstreamCommit
.github/bex-release-notes.md release marker, heading, summary, highlights,
and upstream base
Release notes must describe user-visible Bex behavior generically. Do not copy
private scan targets, findings, credentials, customer context, local paths, or
unreviewed commit messages into public metadata.
Validate The Exact Package
Install from the frozen lockfile, then run formatting, generated-model checks,
types, tests, build, production audit, and the installed-package smoke test.
Pack into an ignored release directory and run scripts/check-package.mjs on
the exact tarball. Inspect its package metadata and file list before
publication.
The package must expose bex-security, preserve codex-security as an alias,
query @bex-co/bex-security for update notices, and contain no credentials or
private release material.
Commit And Publish
Commit only the reviewed version, metadata, notes, documentation, tests,
and release-workflow changes. Pull origin/main with rebase before the
first push, resolve conflicts without losing either side, and push normally.
Wait for the pushed Node and container CI workflows to succeed. Fix and
repeat when an in-scope failure is reproducible.
Create the annotated tag bex-v<version> on the verified commit and push
the tag without force.
Publish the exact validated tarball with public access and the latest
dist-tag:
env "npm_config_//registry.npmjs.org/:_authToken=$NPM_TOKEN" npm publish <archive> --access public --tag latest --registry=https://registry.npmjs.org
Verify npm reports the expected name, version, description, repository,
bins, latest dist-tag, and Bex upstream metadata. Install the registry
version into a clean temporary consumer and run both CLI launchers.
Create a reviewed GitHub release from the existing tag, with title
Bex Security <version> and .github/bex-release-notes.md as its body.
If npm publishing succeeds but a later step fails, do not create another
version. Resume from registry verification and finish the missing tag or
GitHub release. Report the version, upstream baseline, commit, npm URL, GitHub
release URL, checks run, and final main...origin/main status.
1---2name: release-23description: Bump, validate, publish, and announce a public @bex-co/bex-security release using upstreamVersion-bex.N. Use only when explicitly asked to cut or publish a Bex Security release.4---56# Release Bex Security78Publish one immutable `@bex-co/bex-security` version from `main`. A successful9release has the same version in `sdk/typescript/package.json`, npm, the10`bex-v<version>` Git tag, and the GitHub release.1112## Preconditions13141. Read the repository `AGENTS.md` instructions and review all material that15 will become public.162. Require a clean worktree on `main`. Never stash, discard, amend, rebase a17 published commit, or force-push.183. Fetch `origin` and the canonical `openai/codex-security` upstream. Bring19 local `main` to `origin/main` with a fast-forward only.204. Confirm `sdk/typescript/package.json` names21 `@bex-co/bex-security`, points to the Bex repository, and retains22 `codex-security` only as a compatibility bin.235. Authenticate to the public npm registry. When `.env` provides `NPM_TOKEN`,24 load it without printing it and pass it only through the process25 environment:2627 ```bash28 env "npm_config_//registry.npmjs.org/:_authToken=$NPM_TOKEN" npm whoami --registry=https://registry.npmjs.org29 ```3031 Do not create or commit an npm credentials file.3233## Choose The Version3435Resolve the merged upstream baseline with `git merge-base main upstream/main`.36Read the upstream package version from that commit rather than claiming an37unmerged upstream release.3839- Versions are `<upstream-version>-bex.<release-number>`.40- Use `.1` for the first Bex release on a new upstream version.41- Otherwise increment the greatest published Bex release number for that exact42 upstream version.43- Never reuse, overwrite, deprecate, or unpublish a version.44- If npm already contains the intended version, enter recovery mode: do not45 bump or publish it again; verify the archive and complete only missing Git or46 GitHub release metadata.4748Update these fields together:4950- `version`51- `bex.upstreamVersion`52- `bex.upstreamCommit`53- `.github/bex-release-notes.md` release marker, heading, summary, highlights,54 and upstream base5556Release notes must describe user-visible Bex behavior generically. Do not copy57private scan targets, findings, credentials, customer context, local paths, or58unreviewed commit messages into public metadata.5960## Validate The Exact Package6162Install from the frozen lockfile, then run formatting, generated-model checks,63types, tests, build, production audit, and the installed-package smoke test.64Pack into an ignored release directory and run `scripts/check-package.mjs` on65the exact tarball. Inspect its package metadata and file list before66publication.6768The package must expose `bex-security`, preserve `codex-security` as an alias,69query `@bex-co/bex-security` for update notices, and contain no credentials or70private release material.7172## Commit And Publish73741. Commit only the reviewed version, metadata, notes, documentation, tests,75 and release-workflow changes. Pull `origin/main` with rebase before the76 first push, resolve conflicts without losing either side, and push normally.772. Wait for the pushed Node and container CI workflows to succeed. Fix and78 repeat when an in-scope failure is reproducible.793. Create the annotated tag `bex-v<version>` on the verified commit and push80 the tag without force.814. Publish the exact validated tarball with public access and the `latest`82 dist-tag:8384 ```bash85 env "npm_config_//registry.npmjs.org/:_authToken=$NPM_TOKEN" npm publish <archive> --access public --tag latest --registry=https://registry.npmjs.org86 ```87885. Verify npm reports the expected name, version, description, repository,89 bins, `latest` dist-tag, and Bex upstream metadata. Install the registry90 version into a clean temporary consumer and run both CLI launchers.916. Create a reviewed GitHub release from the existing tag, with title92 `Bex Security <version>` and `.github/bex-release-notes.md` as its body.9394If npm publishing succeeds but a later step fails, do not create another95version. Resume from registry verification and finish the missing tag or96GitHub release. Report the version, upstream baseline, commit, npm URL, GitHub97release URL, checks run, and final `main...origin/main` status.