Skip to content

fix(frontend): patch follow-redirects and minimatch for npm audit - #3770

Merged
PetrefiedThunder merged 3 commits into
mainfrom
grok/frontend-audit-fix
Nov 2, 2026
Merged

PetrefiedThunder merged 3 commits into
mainfrom
grok/frontend-audit-fix

Conversation

@PetrefiedThunder

@PetrefiedThunder PetrefiedThunder commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Unblocks the Frontend CI Security Audit and Production Readiness Gate jobs that run npm audit --omit=dev --audit-level=high.

Main was failing on a high follow-redirects advisory (1.16.0–1.16.1 via axios). Moderates included minimatch <11.0.1 (GHSA-g3hv-75wg-m249) under glob → @sentry/bundler-plugins / @sentry/nextjs@11.8.0. The existing override minimatch: >=3.1.3 was too low for that advisory.

npm audit fix --force is not used — it would downgrade @sentry/nextjs to 10.76.1.

Changes

  • frontend/package.json overrides:
    • add follow-redirects: >=1.16.2
    • raise minimatch: >=3.1.3 → >=11.0.1
  • Regenerated frontend/package-lock.json:
    • follow-redirects 1.16.1 → 1.16.2
    • minimatch 10.2.4 → 11.0.3 (satisfies glob@13.0.6 consumers via override)
    • adds @isaacs/nonrecursive-glob-match@1.0.3 (minimatch 11 dependency)
    • @sentry/nextjs remains 11.8.0

Verification

  • npm ci ✅
  • npm audit --omit=dev --audit-level=high ✅ exit 0 (4 moderate remain: glob AbortSignal via Sentry; fixing would require the forbidden Sentry downgrade)
  • npm run lint ✅ (0 errors)
  • npx tsc --noEmit ✅
  • npm run test:run ✅ 206 files / 1647 passed
  • npm run build (CI placeholder env) ✅ — no Sentry plugin errors

Notes

Remaining moderates are expected and out of scope for this PR (would need a newer Sentry that pulls a fixed glob, without --force).


Note

Low Risk
Dependency override and lockfile-only changes with no app logic; remaining moderate advisories tied to Sentry/glob are explicitly accepted.

Overview
Unblocks CI Security Audit / Production Readiness Gate by tightening npm overrides so npm audit --omit=dev --audit-level=high passes without npm audit fix --force (which would downgrade @sentry/nextjs).

frontend/package.json: adds follow-redirects: >=1.16.2 (fixes high advisory on 1.16.0–1.16.1 via axios) and raises minimatch from >=3.1.3 to >=11.0.1 (GHSA on older minimatch under Sentry’s glob chain).

package-lock.json: regenerated so resolved versions include follow-redirects 1.16.2, minimatch 11.0.3, and related transitive updates (e.g. @isaacs/nonrecursive-glob-match); @sentry/nextjs stays 11.8.0.

Reviewed by Cursor Bugbot for commit b3c5153. Bugbot is set up for automated code reviews on this repo. Configure here.

Raise overrides so npm audit --omit=dev --audit-level=high passes
without npm audit fix --force (which would downgrade @sentry/nextjs).
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T07:46:39.529859Z
We couldn’t complete this review. Comment @codex review to try again.
e27a3f8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
regengine Ready Ready Preview Nov 1, 2026 4:37am UTC

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

PR Blocker Checklist

Head SHA: b3c5153a26599fee2a62bd5ac0195ba28e8cd877

Status: Ready

  • All review threads resolved
  • No reviews requesting changes
  • No blocked review engines

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 6d4701e and e27a3f8.

Files ignored due to path filters: 1
  • frontend/package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
Files selected for processing: 1
  • frontend/package.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The frontend package overrides add a minimum version of 1.16.2 for follow-redirects. They raise the minimum version for minimatch from 3.1.3 to 11.0.1.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: Minimal · previous review e27a3

The dependency updates are ready to merge with normal validation.

Architecture risk: Low · up to e27a3

The change affects 1 system.

Changed systems: frontend

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — frontend (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in frontend/package.json: Adds overrides requiring follow-redirects to be at least 1.16.2 and minimatch to be at least 11.0.1, replacing the previous minimatch minimum of 3.1.3.
Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the frontend dependency security fixes for follow-redirects and minimatch required by the npm audit.
Description check Passed The description clearly explains the security advisories, dependency changes, scope, verification results, and remaining moderate findings. It omits the template headings for Type of Change, Checklist…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Description check

Explanation

The description clearly explains the security advisories, dependency changes, scope, verification results, and remaining moderate findings. It omits the template headings for Type of Change, Checklist, and Related Issues, but the required change and test information is mostly complete.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

Copy link
Copy Markdown
Contributor

✅ Bundle Size Report

Metric Size
Total JS 5581.9KB (5.45MB)
Total CSS 131.9KB
Limit 10.0MB

Bundle is within the 10.0MB limit.

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file frontend labels Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Vercel preview: https://regengine-9ioxgua0z-petrefiedthunders-projects.vercel.app

Access is via Vercel login (Deployment Protection).

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW: PASS deepseek e27a3f8

Scope

  • Single commit by PetrefiedThunder/Christopher (Grok). No deepseek-authored commits.
  • Diff is frontend-only: package.json overrides + regenerated package-lock.json.
  • Lockfile version changes only:
    • follow-redirects 1.16.1 → 1.16.2
    • minimatch 10.2.4 → 11.0.3
    • added @isaacs/nonrecursive-glob-match@1.0.3 (minimatch 11 dep)
  • @sentry/nextjs remains 11.8.0. No --force.

Verification (box worktree /tmp/dsrev-3770)

  • npm ci ✅
  • npm audit --omit=dev --audit-level=high ✅ exit 0
  • Remaining 4 moderates: all GHSA-3g3m-2fjr-6pw4 (glob AbortSignal bypass) via @sentry/bundler-plugins → @sentry/nextjs / @sentry/node. Fix path is npm audit fix --force → Sentry 10.76.1 (forbidden downgrade). Acceptable: build-time Sentry plugin path, not a runtime user-request surface; out of scope here.
  • Minimatch override risk: tree was already on minimatch 10 under the old >=3.1.3 override (eslint/glob declare ^3/^10). Bump 10→11 keeps callable minimatch() API; globSync smoke OK; lint/build/tests green → no production-path break observed.
  • npm run build (CI placeholder env) ✅ — Sentry instrumentation/config compiles; no plugin errors
  • npm run lint ✅ 0 errors (60 pre-existing warnings); design-lint clean
  • npm run test:run ✅ 206 files / 1647 passed (1 expected fail, 2 skipped)

CI notes

  • Frontend Security Audit ✅ and Production Readiness Gate ✅ (the jobs this PR unblocks)
  • Build & Bundle Analysis ✅; Passwordless Auth E2E ✅ on this head
  • Unrelated reds: backend Security Audit * / Dependency Audit (pip-audit pypdf in factory-local) — not introduced by this frontend lockfile change
  • Engine Review Pass was waiting on a non-author review for this SHA

No push/merge from this review.

@PetrefiedThunder
PetrefiedThunder enabled auto-merge (squash) October 31, 2026 07:52

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e27a3f8. Configure here.

Comment thread frontend/package.json Resolved
PetrefiedThunder added a commit that referenced this pull request Oct 31, 2026
pip-audit flags seven CVEs against pypdf 6.21.2 in
packages/factory-local/requirements.lock. Raise the pin to >=6.21.4,<7
(smallest fix for CVE-2026-119203/119204/119205; also covers
CVE-2026-119206/119207/119208/119209 fixed in 6.21.3) and regenerate
the factory-local and root hashed locks. Root lock also picks up
pyasn1 0.6.5 (CVE-2026-119194/119195/119196/119197) so pip-audit stays
clean once the check runs. Frontend overrides match #3770 so npm audit
--audit-level=high does not fail the same Dependency Audit job.

Signed-off-by: Christopher Sellers <1@christophersellers.com>
Bring in main so PR Gate / Dependency Audit / Security Audits can re-run against current tip. Resolve any lockfile conflicts by taking main's package-lock and re-applying npm overrides.

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW: PASS deepseek d661055

Delta review of no-ff merge of main onto earlier PASS e27a3f8.

Merge integrity:

  • Parents: e27a3f8 (fix frontend audit) + 1d9c995 (current origin/main, #3756).
  • git merge-tree --write-tree e27a3f81 1d9c995 == HEAD^{tree} (00f64465…).
  • Diff vs origin/main: only frontend/package.json and frontend/package-lock.json.
  • Blobs for both files identical to e27a3f8; package.json patch vs parent identical (follow-redirects >=1.16.2, minimatch >=11.0.1).

CI: Dependency Audit / Security Audit graph red on this head are main-inherited pip-audit failures on pypdf==6.21.2 (7 CVEs) — not introduced by this frontend-only delta; cleared by #3773. Engine Review Pass / PR Blocker / Head SHA are gate-only awaiting this review. Frontend/other non-audit checks look green.

No content change beyond the merge sync; prior PASS findings on e27a3f8 still apply.

@PetrefiedThunder
PetrefiedThunder enabled auto-merge (squash) November 1, 2026 03:11
PetrefiedThunder added a commit that referenced this pull request Nov 1, 2026
* fix(deps): bump pypdf to 6.21.4 for factory-local pip-audit

pip-audit flags seven CVEs against pypdf 6.21.2 in
packages/factory-local/requirements.lock. Raise the pin to >=6.21.4,<7
(smallest fix for CVE-2026-119203/119204/119205; also covers
CVE-2026-119206/119207/119208/119209 fixed in 6.21.3) and regenerate
the factory-local and root hashed locks. Root lock also picks up
pyasn1 0.6.5 (CVE-2026-119194/119195/119196/119197) so pip-audit stays
clean once the check runs. Frontend overrides match #3770 so npm audit
--audit-level=high does not fail the same Dependency Audit job.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

* fix(deps): recompile requirements.lock with Python 3.11

Dependency Lock Freshness runs pip-compile on 3.11; the prior lock
header and typing-extensions via annotations were from 3.13.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

---------

Signed-off-by: Christopher Sellers <1@christophersellers.com>
PetrefiedThunder added a commit that referenced this pull request Nov 1, 2026
…3766)

* test(admin): prove list_users stays tenant-scoped under sysadmin RLS

Switch list_users to arm/disarm_global_admin_context (SET LOCAL) with a
finally reset so the is_sysadmin GUC cannot leak across pooled checkouts.
Add a two-tenant live-Postgres regression that seeds synthetic members,
calls list_users under each tenant as regengine_sysadmin, and asserts
only that tenant's emails are returned. Update unit mocks for the
extra disarm execute.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

* test(security): allowlist list_users arm_global_admin_context

list_users now uses transaction-local arm/disarm for users_self_or_admin
peer visibility. Register the single call in the closed inventory with
classification tenant-scoped-directory so the exact-count gate matches.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

* test(security): approve tenant-scoped-directory admin arm class

list_users is classified as tenant-scoped-directory; add that class to
the reviewed authority set so the allowlist closed-set check passes.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

* fix(deps): bump pypdf to 6.21.4 for factory-local pip-audit

pip-audit flags seven CVEs against pypdf 6.21.2 in
packages/factory-local/requirements.lock. Raise the pin to >=6.21.4,<7
(smallest fix for CVE-2026-119203/119204/119205; also covers
CVE-2026-119206/119207/119208/119209 fixed in 6.21.3) and regenerate
the factory-local and root hashed locks. Root lock also picks up
pyasn1 0.6.5 (CVE-2026-119194/119195/119196/119197) so pip-audit stays
clean once the check runs. Frontend overrides match #3770 so npm audit
--audit-level=high does not fail the same Dependency Audit job.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

* fix(deps): recompile requirements.lock with Python 3.11

Dependency Lock Freshness runs pip-compile on 3.11; the prior lock
header and typing-extensions via annotations were from 3.13.

Signed-off-by: Christopher Sellers <1@christophersellers.com>

---------

Signed-off-by: Christopher Sellers <1@christophersellers.com>
Signed-off-by: Christopher Sellers <1@christophersellers.com>

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW: PASS deepseek b3c5153

no-ff merge verified:

  • parents: d661055 + f44dd01
  • merge-tree --write-tree equals commit tree 4f478292c4eed5a5afb0802e8c559edbd21c0567 (== main parent tree)
  • frontend/package.json + package-lock.json blobs identical to d661055 (and already identical on f44dd01 / current main — path filter saw 0 changed files; merge is content-noop vs main)
  • Dependency Audit / Security Audit: not re-fired on this head (0 path delta). Equivalent blobs on main a67a778 Dependency Audit pass; d661 Frontend Security Audit (npm) pass. Ignore older d661 pip-audit Dependency Audit red (pre-#3773 pypdf).

Behind current main a67a778 by 1 commit (#3792 pr-guards.yml only). Does not touch this PR's files; Head SHA status check already green. Optional Lead update for gate hygiene, not required for content/CI green.

@PetrefiedThunder
PetrefiedThunder enabled auto-merge (squash) November 2, 2026 09:41
@PetrefiedThunder
PetrefiedThunder merged commit a42029b into main Nov 2, 2026
38 of 41 checks passed
@PetrefiedThunder
PetrefiedThunder deleted the grok/frontend-audit-fix branch November 2, 2026 10:38
PetrefiedThunder added a commit that referenced this pull request Nov 2, 2026
Bring in post-#3773 main (KDE/FTL #3772, evidence policy #3717, frontend audit #3770, prod migration approval #3765) so PR #3793 CI is not stale again.

Signed-off-by: C.Lee Sellers <lee@regengine.com>

This branch was successfully deployed

1 active deployment
Preview — b3c5153a Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant