Skip to content

chore(deps): pin pnpm release-age window, floor-pin advisory fixes (LAB-1020) - #89

Open
27Bslash6 wants to merge 3 commits into
mainfrom
lab-1020-renovate-sole-dependency-bot
Open

chore(deps): pin pnpm release-age window, floor-pin advisory fixes (LAB-1020)#89
27Bslash6 wants to merge 3 commits into
mainfrom
lab-1020-renovate-sole-dependency-bot

Conversation

@27Bslash6

@27Bslash6 27Bslash6 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closes LAB-1020.

Dependabot's repo-level security updates toggle survived the 2026-04-25 Renovate migration and kept opening PRs that pnpm 11's release-age quarantine rejects at pnpm install --frozen-lockfile — born-red, every job (see run 30134160651: postcss@8.5.23, published 6 h before the run, inside the 24 h cutoff). This PR makes the policy explicit in-repo; the toggle flip and dead-PR closures happen at the repo-settings level alongside it.

What changed

  1. minimumReleaseAge: 1440 pinned in pnpm-workspace.yaml. The effective window was pnpm 11.8.0's built-in default1440 in its bundled config defaults ("minimum-release-age": 24 * 60, // 1 day), confirmed empirically by the failing run's cutoff timestamps (exactly run-time − 24 h). CI policy no longer moves silently when the package manager bumps.
  2. Floor-pins for every high advisory currently red-ing the security job. pnpm audit --audit-level=high exits 1 on main's lockfile today (the advisories postdate main's last CI run on 2026-07-26) — any PR would fail the security job regardless of its diff. Remediated with the repo's established overrides pattern: postcss ≥8.5.18, brace-expansion 2.x ≥2.1.3 / 5.x ≥5.0.8, js-yaml ≥4.3.0 <5, sharp ≥0.35.0, protobufjs ≥7.6.5 <8. New floors are major-bounded — an unbounded floor re-resolves to the newest match including new majors (protobufjs 8.x and js-yaml 5.x exist).
  3. Version-scoped quarantine exclude for brace-expansion@2.1.3 — the 2.x backport of the GHSA-mh99 fix, published today, i.e. a genuine 0-day security fix inside the window (the exact latent failure LAB-1020 predicted). Scoped to the single version so every future release of the package still age-gates; removable after 2026-07-29.
  4. auditConfig.ignoreGhsas: [GHSA-mh99-v99m-4gvg] — advisory-metadata lag only. Its published range (<=5.0.7, patched 5.0.8 only) numerically swallows the whole 2.x line and doesn't yet list the 2.x/3.x backports released 2026-07-27/28. The fix is installed on every resolved line (2.1.3 / 5.0.8); remove the ignore when the advisory adds the 2.x patched range.
  5. CONTRIBUTING.md: documents Renovate as the sole dependency-PR bot and the release-age quarantine as a CI gate contributors will hit.

Window reconciliation (pnpm 1440 vs Renovate)

  • Routine Renovate PRs (minimumReleaseAge: "5 days" in the shared preset): arrive ≥5 days after publish → always clear the 24 h pnpm window. A pnpm window longer than 5 days would red routine PRs; not introduced.
  • Renovate security PRs (vulnerabilityAlerts.minimumReleaseAge: "0 days"): may arrive same-day and red for up to 24 h — accepted trade-off. The 24 h quarantine defends against the exact attack class where the "fix" release is itself the compromise (Shai-Hulud-style); worst case is one manual rebase after the window, and a version-scoped minimumReleaseAgeExclude (as done here for brace-expansion) is the documented escape hatch when a same-day fix can't wait.
  • First-party propagation (LAB-64 1-hour SLA): unaffected. The @cachekit-io/* deps in this lockfile are workspace link: entries (never fetched from the registry — this repo publishes them), and the cachekit-core 0.4.0 bump is a Cargo dependency, outside pnpm's jurisdiction entirely. No exclusion needed.

Verification

  • pnpm install --frozen-lockfile on the refreshed lockfile: passes the supply-chain policy check (533 entries) under the pinned window.
  • Resolution respected the window live: postcss resolved to 8.5.23, skipping 8.5.24 published 3 h earlier; brace-expansion v2 skipped 2.1.3 until the scoped exclude admitted it.
  • pnpm audit --prod --audit-level=high → exit 0; pnpm audit --audit-level=high → exit 0 (1 ignored, documented above; remaining moderate is uuid <11.1.1 — patched version is a major bump, left for Renovate).
  • Lint ✓, tsc --noEmit ✓, unit tests 546 passed / 13 failed — all 13 are MODULE_NOT_FOUND on the native NAPI binding (no Rust toolchain on the agent box); CI builds the crate and covers those lanes.
  • All 11 overrides verified present in the refreshed pnpm-lock.yaml (the LAB-211 silent-drop regression check).

Summary by CodeRabbit

  • Bug Fixes

    • Updated dependency security safeguards to address known vulnerabilities and ensure patched versions are used.
    • Added release-age controls to improve the reliability and safety of dependency updates.
  • Documentation

    • Added guidance for dependency updates, security backports, vulnerability handling and CI release-age checks.

…AB-1020)

Renovate becomes the sole dependency-PR bot (Dependabot security-update
PRs are disabled at the repo level; the alert feed stays on). pnpm's
release-age quarantine is pinned to 1440 min — the pnpm 11 built-in
default CI already runs — so the policy no longer moves silently with
package-manager bumps.

Floor-pins remediate the open high advisories that would red the
security job on any PR: postcss (GHSA-r28c-9q8g-f849), brace-expansion
2.x/5.x (GHSA-3jxr-9vmj-r5cp, GHSA-mh99-v99m-4gvg), js-yaml
(GHSA-52cp-r559-cp3m), sharp (GHSA-f88m-g3jw-g9cj), protobufjs
(GHSA-j3f2-48v5-ccww). New floors are bounded to their current major so
a lockfile refresh cannot jump majors. brace-expansion 2.1.3 (same-day
security backport) enters via a version-scoped minimumReleaseAgeExclude;
GHSA-mh99 is audit-ignored only for advisory-metadata lag — the fix is
installed on every resolved line.
@kodus-27b

This comment has been minimized.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fb3a64c3-4293-4ea7-a2ec-abebfd8758b4

📥 Commits

Reviewing files that changed from the base of the PR and between 5d6c19a and f80f7c7.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • CONTRIBUTING.md
  • pnpm-workspace.yaml

Walkthrough

The PR documents dependency update policies and configures pnpm with a release-age quarantine, an audit advisory exception, and updated transitive dependency version floors.

Changes

Dependency policy and security floors

Layer / File(s) Summary
Dependency update and quarantine policy
CONTRIBUTING.md, pnpm-workspace.yaml
Documents Renovate and Dependabot behaviour, and configures pnpm release-age and audit handling.
Transitive dependency floor pins
pnpm-workspace.yaml
Raises protobufjs and postcss floors and adds major-scoped brace-expansion constraints while retaining existing overrides.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: dependencies, security

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: pnpm release-age pinning and bounded advisory floor-pins.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lab-1020-renovate-sole-dependency-bot

Comment @coderabbitai help to get the list of available commands.

kodus-27b[bot]
kodus-27b Bot previously approved these changes Jul 28, 2026
- ignoreGhsas: document the graph-wide safety invariant (only valid while
  the brace-expansion floor-pins exist and only 2.x/5.x lines resolve) and
  add a hard re-evaluation date.
- Correct the exclude removal date (window clears 2026-07-29 ~10:17 UTC,
  so deletable from 2026-07-30).
- Full GHSA ids in override comments (grep-ability); point the 5-day
  Renovate window claim at its owning repo.
@kodus-27b

This comment has been minimized.

kodus-27b[bot]
kodus-27b Bot previously approved these changes Jul 28, 2026
@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 86: Update the “Release-age quarantine” section in CONTRIBUTING.md to
state that local pnpm install commands can also fail when no version satisfying
the range has aged beyond minimumReleaseAge. Retain the existing explanation of
frozen-lockfile and tool-generated lockfile behavior, but remove the implication
that the gate only affects lockfiles created by tools that ignore the setting.

In `@pnpm-workspace.yaml`:
- Around line 20-32: Add a CI validation step for the GHSA-mh99-v99m-4gvg ignore
that inspects the lockfile and fails when any brace-expansion major other than
the explicitly supported 2.x and 5.x lines is resolved. Keep the existing
auditConfig.ignoreGhsas entry and overrides unchanged, and ensure the guard
covers all workspace dependency resolutions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cb0e74b0-1594-451b-9226-c4a9fbdb1aae

📥 Commits

Reviewing files that changed from the base of the PR and between 78e20b2 and 5d6c19a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • pnpm-workspace.yaml

Comment thread CONTRIBUTING.md Outdated
Comment thread pnpm-workspace.yaml
…LAB-1020)

The graph-wide GHSA-mh99-v99m-4gvg ignore is sound only while every resolved
brace-expansion sits on a floor-pinned 2.x/5.x line. That was documented as a
SAFETY INVARIANT comment and enforced by nothing, so a transitive pulling a
third major would have been silently un-audited by 'pnpm audit'. Add a security-
job step that reads the resolved majors out of the lockfile and fails on any
line outside 2/5, or on brace-expansion leaving the graph (dead ignore).

The guard swallows grep's no-match exit deliberately: under pipefail it would
otherwise abort the step with no output, reproducing the silent-failure shape
this PR exists to remove. Verified against three lockfiles - real (pass),
rogue 1.x injected (fail, names the major), absent (fail, names the dead config).

Also correct CONTRIBUTING.md: the quarantine does not only bite tool-written
lockfiles. A range whose every candidate is younger than the window has nothing
legal to resolve to and errors locally too - which is the case that actually
motivates minimumReleaseAgeExclude.
@kodus-27b

kodus-27b Bot commented Jul 28, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@27Bslash6

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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