PROCESS/SDLC
sdk-v2/lab/process/SDLC.md · commit 96368332 · GLI CSR §2.2: §2.9/§2.11 SDLC · ← package index · raw on GitHub ↗SDLC — development, testing and release of the RAIN RNG (GLI-19 App. B.8.3; UKGC RTS security 8.25/8.29/8.31/8.33 — ISO/IEC 27001:2022)
1. Environments
- Development / test: this repository, local machines; every test uses in-memory or temp-dir stores (
store: memory,mkdtemp) and ephemeral keys (key.source = "ephemeral"). No production secret or data is used in tests (RTS 8.33). - Production: the operator's deployment of
@rain/rng-node(Docker image built from a tagged commit,packages/rng-node/docker/Dockerfile) with a durable store (file WAL or Postgres) and a real operator key. Test-only switches are refused in production (RAIN_CRASH_AT,RAIN_KAT_FAULT→ refuse to start whenNODE_ENV=production). Logical separation is therefore enforced by code; physical separation (separate hosts/accounts) is an operator control (HOSTING-HA-DR.md).
2. Secure coding standard (what the code actually follows)
- Zero third-party dependencies on the certified path (
@rain/rng-corehas none;rng-sessiondepends only onrng-core;rng-nodeaddsws, optionalpg/ethersoutside the randomness path) — minimises supply-chain exposure;package-lock.jsonpins everything else. - TypeScript
strict; explicit input validation on every public function (assertHex32, range checks withRangeError); constant-time considerations are not required (no secret-dependent branching on the generation path beyond HMAC internals, which are standard). - Published references for every primitive with KATs in the unit tests and at runtime (
selftest.ts). - No
Math.random, no time-based seeds, no fallbacks:randomBytes32()throws without a CSPRNG. - Comments describe intent at module and function level; the fairness formulae are stated verbatim in code and docs.
3. Test methodology (all executable from the repository)
| Layer | Command | What it proves |
|---|---|---|
| Primitives / KATs | npm test -w @rain/rng-core |
FIPS 180-4, RFC 4231, NIST CAVP HMAC_DRBG (32), RFC 8439, keccak vectors; drbg/intBelow/shuffle vectors; statistical smoke (χ², monobit, runs; RAIN_STAT_N=1000000 for the long run) |
| Cross-language | npm run test:py |
Python mirror byte-identical on drbg-vectors.json |
| Ceremony | npm test -w @rain/rng-session |
commit/reveal ordering, chain checks, rotation, abort, pipelining |
| Node | npm test -w @rain/rng-node |
store semantics, persist-before-reveal under injected crashes (crash.test.mjs), e2e 500 rounds over HTTP/WS with WAL invariants, self-test error state (selftest.test.mjs) |
| Live chain | npm run test:live |
vectors vs deployed verifiers on Arbitrum One |
| Build reproducibility | npm run lab:verify-build |
dist byte-identical to lab/FINGERPRINTS.json |
| Statistical suites | lab/tools/* |
Dieharder, NIST STS, TestU01, scaled-outcome analysis — lab/REPORT-STATISTICAL.md |
Coverage: @rain/rng-core 100 % lines (CHANGELOG 2.1.0). |
4. Release
PUBLISHING.md: version bump across workspaces, npm test && npm run test:live, vendor-sync --check, clean tree, tag sdk-vX.Y.Z, publish in dependency order, provenance attestation recommended. Add for certified releases: regenerate lab/FINGERPRINTS.json, run lab:verify-build twice, attach the manifest to the tag.
5. Gaps, honestly
CI configuration is now in the repository (.github/workflows/ci.yml: build, typecheck, unit incl. KATs/crash/selftest/e2e, Python mirror, lab:verify-build fingerprint-drift check, dependency review, npm audit) together with .github/CODEOWNERS (two maintainer teams on every path — placeholder handles) and docs/GOVERNANCE.md (branch protection: 2 approvals, required checks, signed tags). Not yet exercised on GitHub and branch protection not yet applied — the repo is single-maintainer today, so the second review is a stated policy, not an enforced control, until a second maintainer exists. External security items (pen-test, crypto review, contract audit) — cadence and status in SECURITY-PROGRAM.md: none contracted yet. These remain [TO ESTABLISH] in CHANGE-CONTROL.md and docs/LAB-READINESS.md.
← Back to the package index · Rendered 2026-09-14 09:34 UTC from the repository copy; the markdown in the zip / repo is the document of record.