Skip to content

ci: limit token permissions, add timeouts, and test the engines floor - #35

Open
bengl wants to merge 1 commit into
nodejs:mainfrom
bengl:bengl/ci-hardening
Open

bengl wants to merge 1 commit into
nodejs:mainfrom
bengl:bengl/ci-hardening

Conversation

@bengl

@bengl bengl commented Nov 3, 2026

Copy link
Copy Markdown
Member

Permissions. Both workflows now set permissions: contents: read. No step calls the GitHub API. actions/checkout needs read access to the contents, and the build summary and the benchmark comparison write to $GITHUB_STEP_SUMMARY, which needs no token permission.

Timeouts. The CI jobs had no timeouts. Recent runs put build, test, and prettier between 11 and 53 seconds, so each gets timeout-minutes: 5. The benchmark job keeps its 20 minute timeout.

Test matrix. package.json requires Node 26.9.0 or newer, but CI only tested latest. The test job now runs on latest and on 26.9.0. The floor is written out in the matrix rather than read from package.json, so changing the engines field means a deliberate change here too. fail-fast is off, so one leg failing doesn't cancel the other.

Not checked locally. Both workflows parse as YAML, but they only really run on GitHub. This PR's own CI run is the real test.

Previously, both workflows ran with the repository's default token
permissions, the CI jobs had no timeouts, and nothing tested the oldest
Node.js version package.json allows. Now both workflows set
permissions: contents: read, which is all any step needs, every CI job
has a 5 minute timeout, and the test job runs on both latest and
26.9.0, the engines floor.

Signed-off-by: Bryan English <bryan@bryanenglish.com>
@bengl
bengl requested a review from a team November 3, 2026 18:29
@bengl
bengl marked this pull request as ready for review November 3, 2026 19:42
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.

3 participants