Skip to content

Commit 0783bdd

Browse files
mono - chore: defense - space-free test checks and record manuals (#1706)
* mono - chore: defense - record npm stage-only and 2FA manuals Maintainer confirmed § 5 trusted publisher / Drydock / 2FA and § 7 account 2FA plus offline recovery codes are done. Co-authored-by: Jared Wray <me@jaredwray.com> * mono - chore: defense - cite PR #1706 on recorded manuals Co-authored-by: Jared Wray <me@jaredwray.com> * mono - chore: defense - use space-free matrix test check names GitHub matrix jobs were reporting "test (22)" which the ruleset cannot require. Name each leg test-22/24/26 and keep a test gate so the existing required check still reports. Co-authored-by: Jared Wray <me@jaredwray.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 21892be commit 0783bdd

4 files changed

Lines changed: 31 additions & 17 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
test:
14+
codecov:
1515
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: ['26']
20-
2116
steps:
2217
- name: Checkout
2318
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -33,10 +28,10 @@ jobs:
3328
- name: Install pnpm
3429
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
3530

36-
- name: Use Node.js ${{ matrix.node-version }}
31+
- name: Use Node.js
3732
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3833
with:
39-
node-version: ${{ matrix.node-version }}
34+
node-version: '26'
4035
cache: pnpm
4136

4237
- name: Enable Corepack

.github/workflows/tests.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
test:
14+
# Matrix check names must be kebab-case. GitHub otherwise reports
15+
# "test (22)", which rulesets cannot require (spaces are rejected).
16+
test-node:
17+
name: test-${{ matrix.node-version }}
1518
runs-on: ubuntu-latest
1619

1720
strategy:
@@ -56,3 +59,18 @@ jobs:
5659

5760
- name: Test
5861
run: pnpm test:ci
62+
63+
# Space-free required check (`test`) so the branch ruleset can match.
64+
test:
65+
needs: test-node
66+
if: ${{ always() && !cancelled() }}
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Install Socket Firewall
70+
uses: SocketDev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
71+
with:
72+
mode: firewall-free
73+
firewall-version: "1.15.0"
74+
75+
- name: Require matrix success
76+
run: test "${{ needs.test-node.result }}" = "success"

DEFENSE_IN_DEPTH.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ Profile: npm library · public
2727
- [x] Every action pinned to a full commit SHA (`npx actions-up`) — PR #1701
2828
- [x] Every job installs Socket Firewall (`SocketDev/action` SHA-pinned, `firewall-version` pinned); `pnpm install` / `npm install` run as `sfw pnpm install` / `sfw npm install` — PR #1701
2929
- [x] `.github/workflows/check-workflows.yaml` lints workflows with zizmor on every PR — PR #1701
30-
- [x] Workflow `name:` and job `name:` contain no spaces (kebab-case) so they can be set as required status checks — PR #1701
30+
- [x] Workflow `name:` and job `name:` contain no spaces (kebab-case) so they can be set as required status checks; matrix checks are `test-22` / `test-24` / `test-26` plus a `test` gate — PR #1701, PR #1706
3131
- [x] `persist-credentials: false` on checkouts that don't push — PR #1701
3232
- [x] No `pull_request_target` on workflows that run untrusted PR code — verified 2026-08-24
3333
- [x] Artifact-publishing workflows disable `actions/setup-node` default caching (`package-manager-cache: false`) to prevent cache poisoning — PR #1701
3434
- [x] No npm tokens (or other registry credentials) in Actions secrets — verified 2026-08-24
3535

3636
## 5. npm publishing — npm libraries only
37-
- [ ] OIDC trusted publishing configured **stage-only** on npmjs.com for the publish workflow — it can stage, never publish live (manual)
37+
- [x] OIDC trusted publishing configured **stage-only** on npmjs.com for the publish workflow — it can stage, never publish live — PR #1706
3838
- [x] `.github/workflows/release.yaml` packs then stages with `pnpm stage publish ./packed/*.tgz --no-git-checks` — PR #1702
39-
- [ ] Maintainer promotes staged versions with 2FA (manual)
40-
- [ ] Drydock connected — staged releases reviewed before promotion (manual)
41-
- [ ] No direct publish rights: package requires 2FA and disallows tokens (manual)
39+
- [x] Maintainer promotes staged versions with 2FA — PR #1706
40+
- [x] Drydock connected — staged releases reviewed before promotion — PR #1706
41+
- [x] No direct publish rights: package requires 2FA and disallows tokens — PR #1706
4242
- [x] `package.json` `repository.url` accurate so provenance maps to this repo — verified 2026-08-24
4343

4444
## 6. Security tooling
@@ -47,6 +47,6 @@ Profile: npm library · public
4747
- [x] Socket reviews every PR that changes dependencies — verified 2026-08-24
4848

4949
## 7. Repository lockdown
50-
- [ ] Phishing-resistant 2FA (passkeys / hardware keys) on the GitHub and npm accounts (manual)
51-
- [ ] Recovery codes stored offline in a password manager (manual)
50+
- [x] Phishing-resistant 2FA (passkeys / hardware keys) on the GitHub and npm accounts — PR #1706
51+
- [x] Recovery codes stored offline in a password manager — PR #1706
5252
- [x] `lockdown-repo.sh` applied by a repo admin (never committed to this repo); `--check` with `--required-checks` and `--allowed-actions` passes (PRs required on the default branch, merges blocked unless required status checks pass, tag ruleset, immutable releases, fork-PR approval (public repos), read-only workflow tokens, Actions allowlist, secret scanning, Dependabot disabled, private vulnerability reporting (public repos)) — PR #1705

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ hardening checklist; progress is tracked in [DEFENSE_IN_DEPTH.md](./DEFENSE_IN_D
2727
- Tags can only be created by repository admins; published GitHub Releases are immutable (assets and tags cannot be changed after publish).
2828
- Workflow runs from outside collaborators always require maintainer approval, and only allowlisted GitHub Actions can run.
2929
- CI workflows default to read-only `contents: read` permissions; generated output is never committed back from CI; every action is pinned to a full commit SHA; Socket Firewall (`sfw`) wraps `pnpm install`; workflows are security-linted with zizmor on every PR.
30-
- npm publishing authenticates with OIDC trusted publishing; there are no npm tokens in Actions secrets. CI packs tarballs and stages them with `pnpm stage publish`; a maintainer promotes the staged version. The release job `needs` a passing Aikido `scan-release`.
30+
- npm publishing authenticates with OIDC trusted publishing configured **stage-only** on each published package (GitHub Actions → `jaredwray/cacheable` → workflow `release.yml`). There are no npm tokens in Actions secrets, and packages disallow tokens. CI packs tarballs and stages them with `pnpm stage publish`; Drydock reviews staged releases; a maintainer promotes with 2FA. The release job `needs` a passing Aikido `scan-release`.
31+
- GitHub and npm maintainer accounts use phishing-resistant 2FA (passkeys / hardware keys).
3132
- pnpm is pinned via `packageManager` (`pnpm@11.5.1`), and the lockfile is committed.
3233
- Dependencies install through pnpm with a 7-day cooldown on new versions, lifecycle scripts blocked by default, and `trustPolicy: no-downgrade`.
3334
- There is no `.github/dependabot.yml`.

0 commit comments

Comments
 (0)