Skip to content

hookified - chore: defense - align with the latest Node.js checklist - #212

Merged
jaredwray merged 6 commits into
mainfrom
cursor/defense-in-depth-align-f3e7
Sep 21, 2026
Merged

jaredwray merged 6 commits into
mainfrom
cursor/defense-in-depth-align-f3e7

Conversation

@jaredwray

@jaredwray jaredwray commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Supply-chain hardening. No library behavior change, so no new unit tests.

Summary

Bring the repo in line with the current defense-in-depth-nodejs catalog: CODEOWNERS, kebab-case check names, Safe Chain bootstrap, Dev Container features, and fork-PR zizmor.

Status update

DEFENSE_IN_DEPTH.md: CODEOWNERS (/.vscode/) and kebab-case workflow/job names → (PR #212 pending). Dev Container digest pin recorded as done (PR #208). unrs-resolver removed from the allowBuilds note.

What changed

  • .github/CODEOWNERS now covers /.vscode/ for @jaredwray, before that directory exists.
  • Workflow and job names that contained spaces are kebab-case: check-workflows, aikido-gate, deploy-website, analyze. Required checks stay test and zizmor.
  • check-workflows skips Advanced Security SARIF upload on fork PRs and uses zizmor annotations there.
  • scripts/setup-cloud-environment.sh matches the skill: Corepack installs pnpm into ~/.safe-chain/bin only when pnpm is missing, and the pinned installer runs from / so .nvmrc cannot break NVM.
  • .devcontainer/devcontainer.json keeps the existing digest pin and adds github-cli:1 and docker-in-docker:4 (moby: false).
  • allowBuilds no longer lists unrs-resolver (not in the lockfile). esbuild, sharp, and workerd stay.
  • SECURITY.md lists the digest-pinned Dev Container image.

Still for a maintainer

  • npm login, then check-npmjs.sh --repo jaredwray/hookified --workflow release.yaml (not copied into this repo). Stage-only publishing, Drydock, and 2FA promotion were not re-checked here.
  • Admin lockdown-repo.sh apply is still required. Latest --check fails because the branch ruleset has no owner pull_request bypass, and the tag ruleset has no repository-admin bypass. This PR does not run apply and does not add the script.

Verification

  • bash -n scripts/setup-cloud-environment.sh
  • workflow and job name: fields contain no spaces
  • pnpm test — 312 passed, 100% coverage (Node 22.22.2)

defense-in-depth-nodejs § 2, § 3, § 4

Open in Web Open in Cursor 

cursoragent and others added 6 commits September 21, 2026 19:26
Refresh DEFENSE_IN_DEPTH.md to the current catalog and record the
digest-pinned Dev Container image in SECURITY.md.

Co-authored-by: Jared Wray <me@jaredwray.com>
GitHub rulesets cannot require a status check whose name contains a space.

Co-authored-by: Jared Wray <me@jaredwray.com>
Fork pull requests cannot upload SARIF. Same-repo runs still use Advanced Security.

Co-authored-by: Jared Wray <me@jaredwray.com>
Run the pinned installer outside the repo so .nvmrc cannot break it, and add
the GitHub CLI and Docker-in-Docker features.

Co-authored-by: Jared Wray <me@jaredwray.com>
The package is not in the lockfile, so the lifecycle-script allowlist no longer names it.

Co-authored-by: Jared Wray <me@jaredwray.com>
Co-authored-by: Jared Wray <me@jaredwray.com>
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (873a41c) to head (591ff83).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #212   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          433       433           
  Branches       109       109           
=========================================
  Hits           433       433           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray marked this pull request as ready for review September 21, 2026 19:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T19:54:16.991453Z 591ff83 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 591ff83121

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


if [[ -f package.json ]] && grep -q '"packageManager"' package.json && command -v corepack >/dev/null; then
corepack enable
if ! command -v pnpm >/dev/null \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the pinned pnpm version when pnpm is preinstalled

When a Codespace or cloud-agent image already exposes pnpm, this condition skips Corepack and the later install runs whichever version the image provides rather than the exact pnpm@12.4.1 declared in package.json. An older pnpm can reject or ignore newer workspace security settings such as trustPolicy and minimumReleaseAgeStrict, undermining this bootstrap's protections or breaking installation; create the Corepack shim whenever Corepack and packageManager are available, or explicitly verify that the existing executable matches the pinned version.

Useful? React with 👍 / 👎.

@jaredwray
jaredwray merged commit 29e3ffa into main Sep 21, 2026
14 checks passed
@jaredwray
jaredwray deleted the cursor/defense-in-depth-align-f3e7 branch September 21, 2026 19:58
@jaredwray jaredwray mentioned this pull request Sep 21, 2026
4 tasks
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.

2 participants