Skip to content

Fix DM privacy and webhook SSRF; require Node 22.12 - #195

Merged
llbbl merged 7 commits into
masterfrom
feature/security-maintenance-node22
Nov 22, 2026
Merged

llbbl merged 7 commits into
masterfrom
feature/security-maintenance-node22

Conversation

@llbbl

@llbbl llbbl commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Prevent public channel slug collisions from exposing direct-message conversations; reject DM reuse unless channel type and membership match the intended pair.
  • Prevent webhook DNS rebinding by pinning validated addresses into cURL while preserving TLS hostname checks and disabling redirects, proxies, and connection reuse.
  • Refresh compatible security dependencies and require Node 22.12+ consistently in the manifest, CI, and setup docs.

Closes #191. Deferred frontend behavior fixes remain in #194; tooling upgrades and build warnings in #192; the remaining unpatched braces advisory in #193.

Changes

Security fixes

  • app/Models/ChannelModel.php, app/Controllers/Api/V1/ChannelsController.php: reserve the DM slug namespace and fail closed on legacy or racing collisions.
  • app/Services/PinnedWebhookCURLRequest.php, app/Services/WebhookUrlValidator.php, app/Services/CodeIgniterWebhookHttpClient.php, app/Config/Services.php: bind each webhook connection to approved addresses.
  • tests/Tests/Integration/, tests/Tests/Unit/WebhookTransportTest.php: cover privacy collisions, transport pinning, and runtime-environment handling.

Dependencies and runtime

  • composer.lock: update symfony/http-foundation from 6.4.41 to 6.4.48.
  • package.json, pnpm-lock.yaml: compatible frontend refresh, preserving newer dependencies from master including Biome 2.5.15 and Spectral 6.17 under Node 22.12; no dependency major upgrades.
  • .github/workflows/ci.yml, README.md, docs/setup-guide.md: Node >=22.12.0 and pnpm 10.34.5 setup.

Test plan

  • PHP combined suite: 270 tests / 1177 assertions; WebSocket suite: 7 / 61; transport tests: 7 / 43.

  • PHPStan and style checks; independent PHP and dependency reviews passed.

  • Exact Node 22.12.0: frozen offline install, frontend check, production build, and API checks (30 operations) passed.

  • PHP audit clear; one high unpatched braces advisory retained in Track residual braces toolchain security advisory #193.

  • Diff checks clean; no production operations or live MySQL validation performed.

  • biome.json, src/svelte/App.svelte, src/svelte/ProfilePanel.svelte: align the Biome 2.5.15 schema and apply handler formatting without behavior changes.

Latest master is merged into the branch. Independent review verified no dependency version regression relative to either parent, manifest/lockfile consistency, all 641 lockfile snapshot package records, and formatter-only Svelte edits. Exact Node 22.12 checks and PHP gates pass after reconciliation.

llbbl added 3 commits October 15, 2026 07:10
Reserve the DM namespace and require existing DM membership to match the
requested pair exactly. Fail closed on legacy or racing slug collisions
instead of adding private-message participants to an untrusted channel.
Carry the approved DNS result into cURL so a second resolution cannot
redirect webhook traffic to private addresses. Preserve hostname-based
TLS checks and prevent redirects, proxies, or pooled connections from
bypassing the destination check.
Clear patched PHP and frontend advisories within compatible releases.
Pin Spectral to 6.16.3 because 6.17 introduces an incompatible engine
requirement. Align the declared runtime, CI, and setup instructions with
the verified Node 22.12 minimum.
@llbbl llbbl mentioned this pull request Oct 15, 2026
10 of 13 tasks
Keep the newer compatible dependency versions from both branches while
retaining the verified Node 22.12 minimum and security fixes. Align the
Biome schema and existing Svelte handler formatting with Biome 2.5.15.
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.02985% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.49%. Comparing base (9830a26) to head (d4da638).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
app/Models/ChannelModel.php 88.00% 3 Missing ⚠️
app/Services/WebhookUrlValidator.php 90.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master     #195       +/-   ##
=============================================
+ Coverage      0.00%   72.49%   +72.49%     
- Complexity     1358     1386       +28     
=============================================
  Files            93       94        +1     
  Lines          4350     4396       +46     
=============================================
+ Hits              0     3187     +3187     
+ Misses         4350     1209     -3141     

☔ 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.

@llbbl
llbbl merged commit e8e576d into master Nov 22, 2026
10 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.

October maintenance audit and bounded fixes

1 participant