Skip to content

chore(deps-dev): override postcss-selector-parser to 7.1.6 in Tailwind themes - #272

Merged
mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:fix/postcss-selector-parser-override
Oct 16, 2026
Merged

mambax7 merged 2 commits into
XOOPS:masterfrom
mambax7:fix/postcss-selector-parser-override

Conversation

@mambax7

@mambax7 mambax7 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Resolves the open Dependabot alert for GHSA-rj75-hqrm-r3gf in the xtailwind and
xtailwind2 themes. Tailwind 3.4 pins postcss-selector-parser ^6, which has no
patched release, so this forces 7.1.6 via npm overrides in both package.json
files and regenerates the lockfiles.

Both themes were rebuilt with and without the override from the committed
lockfiles; the generated styles.css is byte-identical, so the bump is safe for
the Tailwind 3 toolchain. The committed CSS is unchanged.

Summary by Sourcery

Secure both Tailwind themes by overriding postcss-selector-parser to a patched release.

Bug Fixes:

  • Resolve the vulnerable postcss-selector-parser dependency in both Tailwind themes by enforcing version 7.1.6.

Enhancements:

  • Keep the Tailwind theme build output unchanged while updating dependency resolution.

Build:

  • Regenerate the xtailwind and xtailwind2 lockfiles and update the xtailwind2 theme setup script with the dependency override.

Summary by CodeRabbit

  • Chores
    • Updated package requirements for both XTailwind themes and the generated XTailwind2 setup, including selector parsing and typography components.
    • DaisyUI and Tailwind version ranges remain unchanged. These are maintenance updates to the theme setup; no direct changes to the app’s visible features are included.

…d themes

Tailwind 3.4 pins postcss-selector-parser ^6, which has no patched
release for GHSA-rj75-hqrm-r3gf. Force 7.1.6 via npm overrides in
xtailwind and xtailwind2; the rebuilt styles.css is byte-identical.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 07:11
@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Both Tailwind themes now override the vulnerable, unpatched postcss-selector-parser 6.x dependency with ^7.1.6, with regenerated lockfiles and verification that the compiled CSS is unchanged.

File-Level Changes

Change Details Files
Force the patched selector parser version through npm dependency overrides in both Tailwind themes.
  • Add an npm override for postcss-selector-parser ^7.1.6.
  • Regenerate each theme’s package-lock.json to resolve the overridden dependency tree.
htdocs/themes/xtailwind/package.json
htdocs/themes/xtailwind/package-lock.json
htdocs/themes/xtailwind2/package.json
htdocs/themes/xtailwind2/package-lock.json
Preserve generated Tailwind output while applying the dependency security fix.
  • Rebuild both themes with and without the override using committed lockfiles.
  • Verify generated styles.css is byte-identical and remains unchanged.
htdocs/themes/xtailwind
htdocs/themes/xtailwind2

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: XOOPS/XoopsCore27/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 15fc7a9d-0789-4efb-a0a9-e2b3b10d893b
📥 Commits

Reviewing files that changed from the base of the PR and between f4acb2d and a25c6da.

⛔ Files ignored due to path filters: 2
  • htdocs/themes/xtailwind/package-lock.json is excluded by !**/package-lock.json
  • htdocs/themes/xtailwind2/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing: 3
  • htdocs/themes/xtailwind/package.json
  • htdocs/themes/xtailwind2/package.json
  • tools/write_xtailwind2.ps1

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Walkthrough

The xtailwind and xtailwind2 manifests add a postcss-selector-parser override. The xtailwind2 package generator adds the same override and raises the @tailwindcss/typography version range.

Changes

Tailwind dependency configuration

Layer / File(s) Summary
Update Tailwind dependency configuration
htdocs/themes/xtailwind/package.json, htdocs/themes/xtailwind2/package.json, tools/write_xtailwind2.ps1
Both theme manifests and the generated package configuration specify postcss-selector-parser ^7.1.6. The generator changes @tailwindcss/typography from ^0.5.10 to ^0.5.20; DaisyUI and Tailwind ranges remain unchanged.

Priority: ➖ Normal

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

Change: Other

Merge Risk: ⚪ Minimal · up to a25c6

The dependency configuration is consistent across the changed manifests and generator, with no concrete merge-blocking issue established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the primary change: adding a postcss-selector-parser 7.1.6 override in the Tailwind themes. It matches the main objective of the pull request.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

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

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

@gitar-bot

gitar-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Gitar is working

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Gitar

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="htdocs/themes/xtailwind2/package.json" line_range="16" />
<code_context>
         "tailwindcss": "^3.4.0"
+    },
+    "overrides": {
+        "postcss-selector-parser": "^7.1.6"
     }
 }
</code_context>
<issue_to_address>
**Regenerated theme loses security override**

When the xtailwind2 generator is rerun, `tools/write_xtailwind2.ps1` overwrites `package.json` without the override, so the next `npm install` can restore the vulnerable parser and the Dependabot alert returns.

Add the override to the generator's manifest template and update the tutorial's install instructions to preserve it.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: htdocs/themes/xtailwind2/package.json:16


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

"tailwindcss": "^3.4.0"
},
"overrides": {
"postcss-selector-parser": "^7.1.6"

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.

🟡 Medium · Regenerated theme loses security override

When the xtailwind2 generator is rerun, tools/write_xtailwind2.ps1 overwrites package.json without the override, so the next npm install can restore the vulnerable parser and the Dependabot alert returns.

Add the override to the generator's manifest template and update the tutorial's install instructions to preserve it.

Prompt for AI agents
In `htdocs/themes/xtailwind2/package.json` at line 16:

**Regenerated theme loses security override**

When the xtailwind2 generator is rerun, `tools/write_xtailwind2.ps1` overwrites `package.json` without the override, so the next `npm install` can restore the vulnerable parser and the Dependabot alert returns.

Add the override to the generator's manifest template and update the tutorial's install instructions to preserve it.

…ailwind2 generator

The generator rewrites package.json, so without this the next run would
drop the override and reinstate the vulnerable 6.x parser. Also syncs the
typography constraint with the committed manifest.
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.54%. Comparing base (8d5e548) to head (a25c6da).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #272   +/-   ##
=========================================
  Coverage     22.54%   22.54%           
  Complexity     8671     8671           
=========================================
  Files           685      685           
  Lines         46328    46328           
=========================================
  Hits          10444    10444           
  Misses        35884    35884           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mambax7
mambax7 merged commit 8196fc8 into XOOPS:master Oct 16, 2026
16 checks passed
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.

2 participants