Skip to content

chore(deps): upgrade every dependency and action, drop three third-party actions, lint workflows - #22

Merged
chhoumann merged 9 commits into
mainfrom
chore/deps-upgrade-2026-10
Oct 24, 2026
Merged

chhoumann merged 9 commits into
mainfrom
chore/deps-upgrade-2026-10

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Every dependency and action in this repo is now on its latest safe release. Third-party code was removed where our use was a few lines of shell, and this repo's own workflows are now linted. The four plugin repos get a patched pnpm for the release toolkit, one fewer third-party action in each of the release and PR-title paths, and Slack notifications without a third-party container image. Their own installs still use their own packageManager pin, and three of them are on the vulnerable 10.32.1 (see below).

"Latest safe" here means the newest stable release that is at least 7 days old, has no open advisory, and adds no new install script. Four releases were held back by that rule (see the table).

Dependencies and actions

Dependency / action Old New What happened
pnpm (packageManager) 10.32.1 10.34.7 Upgraded. 10.32.1 is affected by 18 pnpm advisories, 11 of them high (e.g. GHSA-c59q-g84q-2gj5, GHSA-vq4v-j7r6-jq4m, GHSA-vx52-2968-3vc6), all fixed by 10.34.5. 10.34.8 is 1 day old. Stayed on 10.x: pnpm 12 adds a new preinstall: node install.js, and pnpm 11 needs Node >= 22.13 while callers pick their own Node. This pnpm installs the toolkit in the release jobs. The caller's own install switches to the caller's packageManager pin.
@semantic-release/commit-analyzer 13.0.1 13.0.1 Kept, already latest stable (14.x is beta).
@semantic-release/release-notes-generator 14.1.1 14.1.1 Kept, already latest stable (15.x is beta).
semantic-release + tree (peer) 25.0.5 removed Never imported by either library. Only installed by autoInstallPeers. Dropping it took the lockfile from 2305 to 412 lines and cleared 28 of the 31 pnpm audit findings (undici, js-yaml).
handlebars (transitive) 4.7.9 4.7.10 Lockfile refresh. Fixes 2 critical and 1 moderate advisory. Same publisher, no install scripts. pnpm audit is now clean.
spdx-license-ids (transitive) 3.0.23 3.0.24 Lockfile refresh. No other transitive version changed.
step-security/harden-runner v2.19.4 v2.22.1 Upgraded. v2.22.2 is 5 days old. Kept: its egress log is the forensic record you want after a supply-chain incident.
actions/checkout v7.0.0 v7.0.1 Upgraded.
pnpm/action-setup v6.0.9 v6.1.0 Upgraded. Kept over the newer pnpm/setup, which only supports pnpm 11+.
actions/setup-node v6.4.0 v7.1.0 Upgraded. v7 drops the dummy NODE_AUTH_TOKEN and moves to ESM. Neither affects these workflows.
github/codeql-action/{init,analyze} v4.36.3 (commented # v4) v4.39.0 Upgraded and the comment now names the exact release. v4.39.1 is 3 days old.
actions/dependency-review-action v5.0.0 v5.0.0 Kept, already latest.
actions/github-script v8.0.0 v9.0.0 Upgraded. v9 stops exposing @actions/github to require(). The scripts here only require('node:*') built-ins.
actions/upload-artifact v7.0.1 v7.0.2 Upgraded.
actions/download-artifact v8.0.1 v8.0.2 Upgraded.
actions/create-github-app-token v3.2.0 v3.3.0 Upgraded. app-id is now deprecated in favour of client-id. Kept app-id, because switching changes the callers' app-id input (see follow-ups).
actions/setup-python v6.3.0 v7.0.0 Upgraded. v7 removes the pip-install input, which we don't use. v7.1.0 is 2 days old.
actions/attest-build-provenance v4.1.1 removed, now actions/attest v4.2.2 Replaced. v4 is a wrapper whose README points new users to actions/attest. The wrapper only adds a NODE_OPTIONS header-size tweak for push-to-registry, which we don't use. Provenance mode produces the same SLSA predicate that gh attestation verify checks.
rtCamp/action-slack-notify v2.4.0 removed Replaced by 2 lines of jq + curl, the same way the Discord step already works. The action pulled and ran a third-party container image on every release, plus an optional nested third-party action, just to POST one webhook.
amannn/action-semantic-pull-request v6.1.1 removed Replaced by a bash regex. It ran with GITHUB_TOKEN in a pull_request_target job to apply one regex. The shell version fetches the title with gh api and matches the conventionalcommits preset's header pattern ^(\w*)(?:\((.*)\))?!?: (.*)$. Like amannn, it reads the live title because a rerun replays the original event payload. The token needs only pull-requests: read.
rhysd/actionlint (new, CI only) - 1.7.12 @ digest Added to Self test.
zizmorcore/zizmor (new, CI only) - 1.31.1 @ digest Added to Self test.

Every action pin above was resolved from its upstream tag to a commit SHA, and the old pins were checked against their version comments. All matched except codeql.

Hardening

  • Fewer packages. pnpm-workspace.yaml sets autoInstallPeers: false and minimumReleaseAge: 10080 (7 days). The file also fixes a latent bug. Without it, pnpm --dir .release-toolkit install walks up into the caller's checkout. If the caller has its own pnpm-workspace.yaml, pnpm uses that workspace and silently installs nothing for the toolkit (reproduced locally). None of the four repos has one today. The parallel threads adding pnpm settings via pnpm-workspace.yaml would have hit it.
  • No dependency cache in release jobs. setup-node now gets package-manager-cache: false there. Without it, setup-node v5+ restores an npm cache whenever the caller's package.json names npm in packageManager, even when no cache: input is set.
  • Least-privilege permissions. The notify job is now permissions: {}. Every checkout already had persist-credentials: false.
  • Lint gate. Self test now runs actionlint and zizmor (regular persona) over the workflows and the caller stubs, so an unpinned action, a template injection or an over-broad permission fails CI. actionlint 1.7.12 doesn't know the job.workflow_* contexts yet, so those messages are ignored. The three intentional pull_request_target/workflow_run triggers in the stubs carry inline zizmor ignores with a reason.
  • Dependabot. This repo had no Dependabot config. It now gets grouped weekly updates for actions and npm, and both its config and templates/dependabot.yml have a 7-day cooldown. Security updates are not delayed.

How the downstream repos reference these workflows

Repo Workflows used Ref today
MetaEdit release-prepare, release-validate, release @v4 (mutable tag)
notetweet_obsidian ci, codeql, dependency-review, pr-title, release-prepare, release-validate, release @v4 (mutable tag)
PodNotes release-prepare, release-validate, release @ebcf84b… # v4 (SHA)
quickadd release-prepare, release-validate, release @ebcf84b… # v4 (SHA)

The v1–v4 tags here are plain tags with no ruleset protecting them. Anyone with push access can move one, and MetaEdit and notetweet would run the new code on their next release.

Going forward, all four should pin a full commit SHA with a version comment:

uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release.yml@<full-sha> # v4.1.0

For that to work well, this repo should cut immutable semver tags (v4.1.0, ...) and never move them. Ideally also protect v* tags with a ruleset or turn on immutable releases. Dependabot's github-actions ecosystem can then propose SHA bumps from the version comment. With only a moving v4, there is no newer version for it to compare against.

Until that release is cut, the parallel downstream threads should keep ebcf84b… # v4. That commit works with every stub in this PR. After the release, re-pin to the new tag's SHA.

Downstream pnpm pins. QuickAdd, MetaEdit and notetweet declare "packageManager": "pnpm@10.32.1". pnpm switches to that pin for their own pnpm install, both in CI and in the release build. So bumping this repo does not patch their installs. Each should move to pnpm@10.34.7 or newer (>= 10.34.5 fixes the advisories) in its own upgrade PR. PodNotes uses npm.

The templates now pin ebcf84b… # v4 instead of the stale @v1/@v4 tags. The four quality workflows are byte-identical between v1 and v4.

Not changed, worth a follow-up

  • App token input. create-github-app-token deprecates app-id. Moving to client-id changes the callers' app-id input and the RELEASE_APP_ID variable they pass, so it belongs with a coordinated v5.
  • Unhashed docs install. The release build runs pip install -r <docs-requirements> without --require-hashes. Making that strict would break callers whose requirements files carry no hashes, so it's a downstream change first (PodNotes uses it).

Verification

  • pnpm audit reports 31 vulnerabilities on main and none on this branch. npm test passes 67/67.
  • I simulated the release toolkit install the way the workflows run it: a caller root with .release-toolkit/ inside, then pnpm --dir .release-toolkit install --frozen-lockfile --ignore-scripts. It installs and analyzeCommits loads.
  • actionlint and zizmor are clean. I also checked that zizmor fails (exit 14) when a checkout pin is swapped for @v7.
  • The new PR-title check gives the same result as a reference implementation of amannn's logic on 17 titles, for two different type lists. A title like ci: $(touch /tmp/pwned) `id` ::warning::x is treated as plain data.
  • The PR-title step was run against live PRs chore(deps): upgrade every dependency and action, drop three third-party actions, lint workflows #22, feat(release): embed digest-verified release notes in the release PR body #21 and test: retry temp-repo cleanup to absorb git auto-gc races #17. It fetched each current title and passed, and it failed when the allowed types were restricted to fix.
  • The Slack step was run against a local HTTP capture server. It sends valid JSON with the expected attachment and escapes quotes correctly.
  • Not verified end to end: the release, attest and notify jobs only run from a downstream repo. Before cutting the tag, run one downstream release with dry-run: true pinned to this branch's head SHA. Also send one real Slack message.

…ease peer tree

pnpm 10.32.1 is affected by the pnpm advisories fixed in 10.34.5
(GHSA-c59q-g84q-2gj5, GHSA-vq4v-j7r6-jq4m, GHSA-vx52-2968-3vc6 and others).
This version runs the toolkit install in the release jobs; the caller's own
install switches to the caller's packageManager pin.

autoInstallPeers had pulled semantic-release and its whole tree (bundled
npm, @semantic-release/github, undici, js-yaml) into the lockfile although
neither library loads it. Turning it off removes 28 of the 31 pnpm audit
findings; the regenerated lockfile picks up handlebars 4.7.10 for the rest.
minimumReleaseAge keeps future resolutions off packages younger than 7 days.

pnpm-workspace.yaml also makes the toolkit its own workspace root. Without
it, a caller with a pnpm-workspace.yaml makes the toolkit install resolve to
the caller's workspace and silently install nothing.
checkout v7.0.1, setup-node v7.1.0, pnpm/action-setup v6.1.0,
github-script v9.0.0, upload-artifact v7.0.2, download-artifact v8.0.2,
create-github-app-token v3.3.0, setup-python v7.0.0, harden-runner v2.22.1
and codeql-action v4.39.0.

The codeql pin was commented `# v4` but pointed at v4.36.3; the comment now
names the exact release. harden-runner v2.22.2, codeql v4.39.1 and
setup-python v7.1.0 are held back until they are a week old.

setup-node v7 and setup-python v7 only drop inputs these workflows don't
pass. github-script v9 stops exposing @actions/github to require(); the
scripts here only require node: built-ins.
setup-node restores an npm cache whenever the caller's package.json names
npm in packageManager, even without a cache input. The release stages build
the published artifacts, so they should never restore cache entries an
earlier run wrote.
attest-build-provenance v4 is a thin wrapper that calls actions/attest, and
its README points new workflows at actions/attest. With only subject-path
set, actions/attest produces the same SLSA provenance predicate that the
publish job's gh attestation verify checks, so we drop one action from the
signing path.
rtCamp/action-slack-notify is a composite action that pulls and runs a
third-party container image (and can call a second third-party action) on
every release just to POST one webhook message. The Discord notification
already does this with jq and curl; Slack now does the same. The notify job
needs no token scopes, so it gets permissions: {}.
…tion

amannn/action-semantic-pull-request ran a full third-party action in a
pull_request_target job to apply one regex. The job now reads the live PR
title with gh api (a rerun replays the original event payload, so the
payload title can be stale) and matches the conventionalcommits preset's
header pattern against the allowed types in bash. The token only needs
pull-requests: read.

The default types list in the README now includes `release`, and types may
be comma- or newline-separated as before.
…nning

The CI, CodeQL, dependency-review and PR-title stubs pinned the stale `@v1`
tag and the release stubs the mutable `@v4` tag, which zizmor flags as
unpinned. Every stub now pins v4's commit with a `# v4` comment; the four
quality workflows are unchanged between v1 and v4.

The README now recommends SHA pins with a version comment and immutable
semver release tags, so Dependabot has a version to compare against.
This repo had no Dependabot config, so its own action pins and toolkit
lockfile only moved when someone bumped them by hand. It now gets grouped
weekly updates. Both it and the copy-in template hold back releases younger
than 7 days, which is when most compromised publishes are caught and pulled.
Security updates are not subject to the cooldown.
Self test now runs actionlint 1.7.12 and zizmor 1.31.1 from digest-pinned
images over the reusable workflows and caller stubs, so an unpinned action,
a template injection or an over-broad permission fails the PR.

actionlint 1.7.12 does not know the job.workflow_* contexts yet, so those
messages are ignored. The three intentional pull_request_target and
workflow_run triggers in the stubs carry inline zizmor ignores with the
reason they are safe.
@chhoumann
chhoumann force-pushed the chore/deps-upgrade-2026-10 branch from 46dc7e5 to 62a4f43 Compare October 24, 2026 07:53
@chhoumann
chhoumann marked this pull request as ready for review October 24, 2026 08:06
@chhoumann
chhoumann merged commit 33a397a into main Oct 24, 2026
3 checks passed
@chhoumann
chhoumann deleted the chore/deps-upgrade-2026-10 branch October 24, 2026 08:06
chhoumann added a commit that referenced this pull request Oct 24, 2026
The release workflows run `pnpm --dir .release-toolkit install` from inside
the caller's checkout. On ebcf84b a caller pnpm-workspace.yaml made that
install run the caller's pnpm (12.14.0 for MetaEdit and notetweet) under
its policy, or install the caller's packages instead of the toolkit's (exit
0, for quickadd). The toolkit's own pnpm-workspace.yaml fixed that in #22,
but nothing would catch its removal.

Self test now installs the toolkit inside a caller pinned to pnpm 12 with a
hoisted node linker in both pnpm-workspace.yaml and .npmrc and an impossible
minimumReleaseAge, then asserts the toolkit's pnpm ran, the toolkit's deps
are installed and nothing was hoisted. It passes on main and fails on
ebcf84b and on main without pnpm-workspace.yaml.
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