Awesome Reviewers

Any security-sensitive release/publish workflow must be deterministic, run only on trusted code, validate against authoritative data, and fail closed.

Apply this standard when authoring/changing CI/CD steps that publish artifacts (npm, GitHub releases, containers).

Checklist

Example (fail-closed validation pattern)

set -euo pipefail

# Trusted ref gate (example)
if [[ "${GITHUB_REF}" != "refs/heads/main" ]]; then
  echo "Publish is allowed only from main." >&2
  exit 1
fi

# Strict semver gate (example)
if [[ ! "$CANDIDATE_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
  echo "Malformed version; refusing to publish." >&2
  exit 1
fi

# Authoritative-source check (example pseudocode)
# - fetch complete stable history
# - parse semver components numerically
# - require candidate > every stable version
# - if history/malformed -> fail closed
if ! validate_candidate_exceeds_all_stable_versions "$CANDIDATE_VERSION"; then
  echo "Version validation failed; refusing to publish." >&2
  exit 1
fi

Outcome: developers get a consistent, enforceable process that prevents publishing from untrusted refs, rejects tampered/ambiguous inputs, and verifies what is being released with pinned tooling and cryptographic provenance.