Skip to content

ci: add scheduled lockfile maintenance for transitive security updates - #64

Merged
altaywtf merged 1 commit into
mainfrom
ci/lockfile-maintenance
Aug 20, 2026
Merged

ci: add scheduled lockfile maintenance for transitive security updates#64
altaywtf merged 1 commit into
mainfrom
ci/lockfile-maintenance

Conversation

@altaywtf

Copy link
Copy Markdown
Member

Summary

Adds a scheduled Lockfile maintenance workflow (monthly cron + manual dispatch) that runs corepack pnpm update --lockfile-only -r and 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

  • Workflow-only change; verify runs on this PR.
  • Mechanism reproduced 2026-08-20 on putio-sockjs manifests: targeted postcss@8.5.26 update is a no-op under pnpm 11.2.2 and 11.22.0 (with and without overrides); untargeted corepack pnpm update --lockfile-only -r resolves postcss 8.5.16 -> 8.5.26 under pnpm 11.2.2 with catalog: overrides intact, and the result passes pnpm install --lockfile-only.

Notes

  • App-token PRs trigger pull_request workflows, so verify gates the automated PR (default GITHUB_TOKEN PRs would not trigger it).
  • Retire path: bump packageManager once 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.
  • Refs putdotio/putio-frontend#29

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>
Copilot AI lite review requested due to automatic review settings August 20, 2026 02:31

Copilot AI 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.

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 -r and, when pnpm-lock.yaml changes, 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.yml using user_id). After renaming the output to user_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"
@altaywtf
altaywtf merged commit 0635384 into main Aug 20, 2026
3 checks passed
@altaywtf
altaywtf deleted the ci/lockfile-maintenance branch August 20, 2026 03:35
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.4.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants