Skip to content

chore: resolve dependabot alerts 145 to 150 - #1433

Merged
khaira777 merged 2 commits into
mainfrom
fm/flocafe-security-alerts-145-150-r1
Nov 3, 2026
Merged

khaira777 merged 2 commits into
mainfrom
fm/flocafe-security-alerts-145-150-r1

Conversation

@khaira777

Copy link
Copy Markdown
Contributor

Intent

Investigate and resolve the 4 open Dependabot security alerts on https://github.com/FreeOpenSourcePOS/FloCafe/security/dependabot (tracked in #1429):

  1. Alert feat(plugins): in-repo country plugin system #147 (High, Development, Transitive in package-lock.json): re2js quadratic-time denial of service in re2js lookbehind matching (>= 2.2.0, < 2.8.7, first patched 2.8.7).
  2. Alert Orders: Cannot remove/cancel individual items once they move to 'preparing' or 'ready' — design decision needed #150 (Moderate, Runtime/Development, Transitive in package-lock.json): minimatch potential denial of service via globparts amplification (< 11.0.1, first patched 11.0.1).
  3. Alert KDS: Table number is visually buried and fonts are too small for kitchen use #149 (Moderate, Development, Transitive in frontend/package-lock.json): minimatch potential denial of service via globparts amplification (< 11.0.1, first patched 11.0.1).
  4. Alert Security: Hardening Staff Management Authorization, Server-Side PIN Policies, & UI Enhancements #145 (Low, Development, Transitive in frontend/package-lock.json): deepmerge mergeObject() allows prototype poisoning of returned objects (>= 4.2.0, <= 4.3.1, no upstream patch in deepmerge).
    Follow the Obra Superpowers engineering procedure end-to-end (research, spec/plan under ~/tools/firstmate/data/flocafe-security-alerts-145-150-r1/, TDD/verification, and no-mistakes validation pipeline). Keep PR title <= 50 chars, single-line PR body paragraphs, and include Fixes #1429.

What Changed

  • Added npm overrides in root package.json and frontend/package.json for re2js (^2.8.7), minimatch (^11.0.4), @electron/asar (^4.3.1 with glob ^14.0.3), and @electron/universal (^3.0.6), and updated both lockfiles.
  • Removed the shadcn CLI devDependency from frontend/package.json (eliminating transitive deepmerge), vendored frontend/src/app/shadcn-tailwind.css, and updated frontend/src/app/globals.css and docs/architecture/frontend.md.

Fixes #1429

Risk Assessment

✅ Low: Well-bounded dependency overrides and local CSS vendoring that cleanly eliminate all four Dependabot vulnerabilities (#145, #147, #149, #150) across both lockfiles without altering runtime application behavior.

Testing

Installed clean dependencies from both lockfiles (0 vulnerabilities in root and frontend), verified that re2js resolves to 2.9.1, minimatch resolves to 11.0.4, @electron/asar resolves to 4.3.1, @electron/universal resolves to 3.0.6, and shadcn/minimatch/deepmerge are absent from frontend, drove adversarial DoS payloads against re2js and minimatch (~6ms and ~2.7ms respectively), verified @electron/asar archive packing/unpacking, ran npm run test:daily-sales-export (248/248 passing), npm run test:release-config, npm run test:lint-engine, and npm run docs:check, and drove the built static frontend against the live backend in headless Chromium to capture visual evidence of /auth/login and /pos styled by the vendored shadcn-tailwind.css.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Clean dependency installation resolves patched re2js (2.9.1) and minimatch (11.0.4) in root and eliminates shadcn, minimatch, and deepmerge from frontend with 0 audit vulnerabilities ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/dependency-resolution-audit.txt
Adversarial re2js lookbehind pattern on 50,000-character input completes in linear time (~6ms) and markdownlint-cli2 / docs:check passes across all 54 documentation files ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/adversarial-and-packaging-checks.jsonl
Adversarial minimatch deeply nested globstar pattern completes in milliseconds (~2.7ms) and @electron/asar 4.3.1 + exceljs/archiver XLSX export + release-config suites succeed ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/adversarial-and-packaging-checks.jsonl
Static frontend build with vendored shadcn-tailwind.css renders the live POS login and dashboard UI in Chromium without missing styles or layout regressions ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/pos-dashboard-shadcn-tailwind.png

POS dashboard rendered with vendored shadcn-tailwind.css
POS login screen rendered with vendored shadcn-tailwind.css

Evidence: Adversarial DoS and @electron/asar packaging verification

{"check":"re2js-lookbehind-dos","version":"2.9.1","matched":false,"elapsedMs":6.08} {"check":"minimatch-globparts-dos","version":"11.0.4","mmResult":true,"elapsedMs":2.7} {"check":"electron-asar-pack-unpack","version":"4.3.1","files":["/index.js","/sub","/sub/native.node"],"extractedJs":"console.log(&#34;hello&#34;);"}

{"check":"re2js-lookbehind-dos","version":"2.9.1","matched":false,"elapsedMs":6.08}
{"check":"minimatch-globparts-dos","version":"11.0.4","mmResult":true,"elapsedMs":2.7}
{"check":"electron-asar-pack-unpack","version":"4.3.1","files":["/index.js","/sub","/sub/native.node"],"extractedJs":"console.log(\"hello\");"}
Evidence: Root and frontend resolved dependency trees

=== ROOT DEPENDENCY TREE === [email protected] ~/.no-mistakes/worktrees/de2296f2e6f8/01M6H7MGH6FZ4K5MMHCJQD2841 ├─┬ [email protected] │ └─┬ [email protected] │ ├─┬ @electron/[email protected] │ │ ├─┬ [email protected] │ │ │ └── [email protected] deduped │ │ └── [email protected] deduped │ ├─┬ @electron/[email protected] │ │ └── @electron/[email protected] deduped │ ├─┬ [email protected] │ │ └─┬ [email protected] │ │ └─┬ [email protected] │ │ └── [email protected] deduped │ ├─┬ [email protected] │ │ └─┬ [email protected] │ │ └── @electron/[email protected] deduped │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ ├─┬ [email protected] │ │ └─┬ [email protected] │ │ └── [email protected] deduped │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] └─┬ [email protected] └── [email protected] === FRONTEND DEPENDENCY TREE === [email protected] ~/.no-mistakes/worktrees/de2296f2e6f8/01M6H7MGH6FZ4K5MMHCJQD2841/frontend └── (empty)

=== ROOT DEPENDENCY TREE ===
[email protected] ~/.no-mistakes/worktrees/de2296f2e6f8/01M6H7MGH6FZ4K5MMHCJQD2841
├─┬ [email protected]
│ └─┬ [email protected]
│   ├─┬ @electron/[email protected]
│   │ ├─┬ [email protected]
│   │ │ └── [email protected] deduped
│   │ └── [email protected] deduped
│   ├─┬ @electron/[email protected]
│   │ └── @electron/[email protected] deduped
│   ├─┬ [email protected]
│   │ └─┬ [email protected]
│   │   └─┬ [email protected]
│   │     └── [email protected] deduped
│   ├─┬ [email protected]
│   │ └─┬ [email protected]
│   │   └── @electron/[email protected] deduped
│   └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ └─┬ [email protected]
│   │   └── [email protected] deduped
│   └─┬ [email protected]
│     └── [email protected] deduped
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected]

=== FRONTEND DEPENDENCY TREE ===
[email protected] ~/.no-mistakes/worktrees/de2296f2e6f8/01M6H7MGH6FZ4K5MMHCJQD2841/frontend
└── (empty)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Clean dependency installation resolves patched re2js (2.9.1) and minimatch (11.0.4) in root and eliminates shadcn, minimatch, and deepmerge from frontend with 0 audit vulnerabilities ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/dependency-resolution-audit.txt
Adversarial re2js lookbehind pattern on 50,000-character input completes in linear time (~6ms) and markdownlint-cli2 / docs:check passes across all 54 documentation files ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/adversarial-and-packaging-checks.jsonl
Adversarial minimatch deeply nested globstar pattern completes in milliseconds (~2.7ms) and @electron/asar 4.3.1 + exceljs/archiver XLSX export + release-config suites succeed ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/adversarial-and-packaging-checks.jsonl
Static frontend build with vendored shadcn-tailwind.css renders the live POS login and dashboard UI in Chromium without missing styles or layout regressions ✅ pass live ~/.no-mistakes/evidence/01M6H7MGH6FZ4K5MMHCJQD2841/pos-dashboard-shadcn-tailwind.png
  • npm ci && npm --prefix frontend ci
  • npm ls re2js minimatch deepmerge @electron/asar @electron/universal --all
  • npm --prefix frontend ls re2js minimatch deepmerge shadcn --all
  • npm run build && npm run build:frontend
  • npm run test:daily-sales-export
  • npm run test:release-config
  • npm run test:lint-engine
  • npm run docs:check
  • node adversarial-and-packaging-checks (re2js lookbehind DoS, minimatch globparts DoS, @electron/asar createPackageWithOptions/extractAll)
  • Playwright Chromium live verification against tests/e2e-server.cjs on /auth/login and /pos
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Override re2js to ^2.8.7 and minimatch to ^11.0.4 (along with @electron/asar ^4.3.1, @electron/asar>glob ^14.0.3, and @electron/universal ^3.0.6) in the root package, and vendor shadcn/tailwind.css into frontend/src/app/shadcn-tailwind.css so the shadcn CLI devDependency (and its transitive minimatch and deepmerge dependencies) can be removed from frontend/package.json.

Fixes #1429
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Resolve Dependabot alerts in root and frontend dependencies

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Pin patched transitive dependencies in the root package to address re2js and minimatch alerts.
• Remove the shadcn CLI and vendor its Tailwind utilities to eliminate frontend deepmerge exposure.
• Refresh both lockfiles and document how to add shadcn primitives without a persistent CLI
 dependency.
Diagram

graph TD
  R["Root overrides"] --> RL["Root lockfile"] --> E["Electron tooling"]
  F["Frontend manifest"] --> FL["Frontend lockfile"] --> B["Frontend build"]
  C["Vendored utilities"] --> G["Global styles"] --> B
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Upgrade parent toolchains
  • ➕ Could remove the need for some transitive overrides.
  • ➖ Broadens the compatibility and testing surface.
  • ➖ Does not directly solve deepmerge's lack of an upstream patch.

Recommendation: The targeted overrides and removal of the unused CLI are appropriate for these alerts. Retain the vendored CSS to preserve styling, and revisit the major-version overrides when parent dependencies adopt patched versions.

Files changed (7) +855 / -4240

Refactor (2) +638 / -1
globals.cssImport local shadcn Tailwind utilities +1/-1

Import local shadcn Tailwind utilities

• Replaces the package CSS import with the vendored stylesheet so frontend styles no longer depend on the installed CLI.

frontend/src/app/globals.css

shadcn-tailwind.cssVendor shadcn Tailwind utilities +637/-0

Vendor shadcn Tailwind utilities

• Adds local variants, animations, scroll-fade and shimmer utilities formerly imported from the shadcn package.

frontend/src/app/shadcn-tailwind.css

Documentation (1) +3 / -2
frontend.mdDocument on-demand shadcn use and vendored utilities +3/-2

Document on-demand shadcn use and vendored utilities

• Explains that the CLI can be invoked through npx and that UI primitives and Tailwind utilities are maintained in the repository.

docs/architecture/frontend.md

Other (4) +214 / -4237
package.jsonRemove shadcn CLI and constrain minimatch +1/-1

Remove shadcn CLI and constrain minimatch

• Drops the shadcn development dependency, which brought in vulnerable deepmerge, and adds a patched minimatch override.

frontend/package.json

package-lock.jsonPrune shadcn's frontend dependency tree +139/-4010

Prune shadcn's frontend dependency tree

• Removes the CLI and its transitive packages, including deepmerge and minimatch, from the resolved frontend tree.

frontend/package-lock.json

package.jsonOverride vulnerable root transitive dependencies +7/-3

Override vulnerable root transitive dependencies

• Pins patched re2js and minimatch versions and updates Electron asar, its glob dependency, and Electron universal to compatible newer versions.

package.json

package-lock.jsonResolve patched root dependency versions +67/-223

Resolve patched root dependency versions

• Records patched re2js and minimatch resolutions and the updated Electron packaging dependency tree, removing obsolete nested packages.

package-lock.json

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@khaira777 khaira777 changed the title chore: resolve dependabot alerts #145-#150 chore: resolve dependabot alerts 145 to 150 Nov 3, 2026
@khaira777
khaira777 merged commit a433176 into main Nov 3, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-security-alerts-145-150-r1 branch November 3, 2026 18:22
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.

fix(security): resolve Dependabot alerts #147, #150, #149, and #145

1 participant