Skip to content

chore(ci): update actions to latest and fix workflow permission alerts - #2

Merged
designofadecade merged 1 commit into
mainfrom
chore/update-github-actions
Sep 10, 2026
Merged

designofadecade merged 1 commit into
mainfrom
chore/update-github-actions

Conversation

@designofadecade

Copy link
Copy Markdown
Owner

Every action was several majors behind and being force-run on Node 24, which the runner reported as a deprecation warning on the 10.3.0 publish.

Action Before After
actions/checkout v4 v7
actions/setup-node v4 v7
softprops/action-gh-release v1 v3
codecov/codecov-action v4 v7

Breaking changes checked, not assumed

  • codecov v5 deprecated file and plugin. Neither is used here, and all five inputs this repo does use (token, files, flags, name, fail_ci_if_error) still exist in v7.
  • setup-node v5/v6 added automatic caching driven by a packageManager field in package.json. There is none here and cache: 'npm' stays explicit, so behaviour is unchanged.
  • checkout v7 blocks fork checkout for pull_request_target / workflow_run; neither trigger is used.

Resolves 2 medium CodeQL alerts

actions/missing-workflow-permissions on both jobs in test.yml — one of which the typescript-next job introduced. Both workflows now declare a read-only default with jobs opting in:

  • publish-npm keeps contents: write for the GitHub Release and id-token: write for Trusted Publishing and provenance.
  • Dropped packages: write, which was never used — this publishes to registry.npmjs.org, not GitHub Packages.

Lint is now gating

Was continue-on-error: true. eslint . exits non-zero only on errors and the repo is at 0 errors, so the pre-existing no-explicit-any warnings do not fail the build. Same for coverage generation, which the test step already covers.

All four gating steps verified locally: lint, test (825 passing incl. type tests), build, coverage.

Not in this PR

7 pre-existing high CodeQL alerts in source (js/polynomial-redos, js/incomplete-multi-character-sanitization) in HtmlSanitizer.ts, HtmlRenderer.ts and Router.ts. Unrelated to CI and worth handling separately.

Every action was several majors behind and being force-run on Node 24, which
the runner reported as a deprecation warning on the 10.3.0 publish.

- actions/checkout        v4 -> v7
- actions/setup-node      v4 -> v7
- softprops/action-gh-release v1 -> v3
- codecov/codecov-action  v4 -> v7

Checked for breaking input changes rather than assuming: codecov v5 deprecated
`file`/`plugin`, neither of which this repo uses, and all five inputs it does
use still exist in v7. setup-node v5/v6 added automatic caching driven by a
`packageManager` field in package.json; there is none here and `cache: 'npm'`
stays explicit, so behaviour is unchanged.

Also resolves two medium CodeQL alerts (actions/missing-workflow-permissions),
one of which the typescript-next job introduced. Both workflows now declare a
read-only default with jobs opting in:

- publish-npm keeps `contents: write` for the GitHub Release and
  `id-token: write` for Trusted Publishing and provenance.
- Dropped `packages: write`, which was never used — this publishes to
  registry.npmjs.org, not GitHub Packages.

Made the lint step gating instead of `continue-on-error`. `eslint .` exits
non-zero only on errors, and the repo is at 0 errors, so the pre-existing
no-explicit-any warnings do not fail the build. Same for coverage generation,
which was already covered by the test step.
@designofadecade
designofadecade merged commit 9f114b0 into main Sep 10, 2026
5 checks passed
@designofadecade
designofadecade deleted the chore/update-github-actions branch September 10, 2026 13:19
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.

1 participant