ci: add scheduled lockfile maintenance for transitive security updates - #64
Merged
Conversation
pnpm 11.x ignores targeted updates of transitive-only dependencies (pnpm/pnpm#12744), so Dependabot's security-update command is a silent no-op. A monthly and on-demand untargeted lockfile refresh lands the same fixes with workspace overrides untouched. Refs putdotio/putio-frontend#29 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a dedicated GitHub Actions workflow to periodically refresh pnpm-lock.yaml (and optionally run it on-demand) to work around pnpm 11.x targeted transitive-update limitations, opening/updating a PR via the release-bot GitHub App when the lockfile changes.
Changes:
- Introduces a monthly scheduled + manual
workflow_dispatch“Lockfile maintenance” workflow. - Runs
corepack pnpm update --lockfile-only -rand, whenpnpm-lock.yamlchanges, force-updates a dedicated branch and creates/updates a PR using the release-bot App token.
Suppressed comments (1)
.github/workflows/lockfile-maintenance.yml:65
- This references
steps.release-bot-identity.outputs.user-id, but outputs are conventionally (and most reliably) exposed with underscore names (see.github/workflows/ci.ymlusinguser_id). After renaming the output touser_id, update this reference accordingly so the bot email is populated.
BOT_USER_ID: ${{ steps.release-bot-identity.outputs.user-id }}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+17
to
+24
| refresh: | ||
| name: Refresh lockfile | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| concurrency: | ||
| group: lockfile-maintenance-${{ github.repository }} | ||
| cancel-in-progress: false | ||
| steps: |
Comment on lines
+40
to
+46
| set -euo pipefail | ||
| user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" | ||
| if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then | ||
| echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "user-id=${user_id}" >> "$GITHUB_OUTPUT" |
Contributor
|
🎉 This PR is included in version 2.4.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a scheduled Lockfile maintenance workflow (monthly cron + manual dispatch) that runs
corepack pnpm update --lockfile-only -rand opens a PR with the release-bot App token when the lockfile moves.Dependabot's transitive security-update command (
corepack pnpm update <pkg>@<version> --lockfile-only --no-save -r) is a silent no-op under pnpm 11.x because targeted versions of transitive-only dependencies are ignored (pnpm/pnpm#12744), so transitive advisories can never land here. The untargeted refresh resolves the same fixes with workspace overrides untouched.Verification
postcss@8.5.26update is a no-op under pnpm 11.2.2 and 11.22.0 (with and without overrides); untargetedcorepack pnpm update --lockfile-only -rresolves postcss 8.5.16 -> 8.5.26 under pnpm 11.2.2 withcatalog:overrides intact, and the result passespnpm install --lockfile-only.Notes
pull_requestworkflows, so verify gates the automated PR (defaultGITHUB_TOKENPRs would not trigger it).packageManageronce a stable pnpm ships the upstream fix (pnpm/pnpm#12558 — present in 12.0.0-rc.7, absent in 11.22.0); the workflow can stay as routine hygiene.