Skip to content

v0.8.29: slack search, landing optimizations, search optimizations, sso multiple providers - #7664

Merged
waleedlatif1 merged 9 commits into
mainfrom
staging
Sep 9, 2026
Merged

v0.8.29: slack search, landing optimizations, search optimizations, sso multiple providers #7664
waleedlatif1 merged 9 commits into
mainfrom
staging

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

TheodoreSpeaks and others added 7 commits September 9, 2026 02:44
…7644)

* feat: serve organization search through Slack custom bots

* feat(slack-search): stream enterprise answers through one Slack app

* fix(slack-search): simplify setup and align source readiness

* fix(slack-search): supply query props in page gate test

* fix(slack-search): finalize failed streams and explain query limits

* fix(tests): isolate embedding provider credentials
* fix(billing): bound cumulative usage lock holders

* fix(billing): retain older PostgreSQL timeout compatibility
* fix(outbox): prevent bulk cleanup from starving delivery

* test(outbox): isolate scheduler PostgreSQL fixtures
…yaml, nodemailer and csv-parse (#7659)

* fix(deps): bump Next.js to 16.3.4 for two critical RCE advisories

Resolves Dependabot alerts #223, #224, #226, #228, #235, #236, #238, #239.

- GHSA-p293-qw3h-jr36: unauthenticated RCE on Windows-hosted servers
- GHSA-2xp9-vwfh-vxw4: unauthenticated RCE in the Image Optimization API
  when AVIF files are used

Both are fixed in 16.3.3. This takes 16.3.4 instead because 16.3.3
disabled AVIF image optimization outright and 16.3.4 re-enables it;
apps/sim/next.config.ts requests 'image/avif', so 16.3.3 alone would
silently drop AVIF output. 16.3.4 otherwise carries only backported bug
fixes, so there is no breaking change between 16.3.1 and 16.3.4.

Verified: type-check, lint, all 46 audits, full test suite, and
production builds of both apps/sim and apps/docs.

* fix(deps): bump sharp to 0.35.4 for libheif RCE advisories

Resolves Dependabot alerts #230 and #234 (GHSA-rgj7-g3m4-5g8c), which
cover two critical libheif vulnerabilities reachable when processing
untrusted image input. Fixed upstream in sharp 0.35.4, which ships
libvips 8.18.6.

0.35.4 is a patch release with no API changes. No source file imports
sharp directly; it backs the Next.js image optimizer, which is the same
code path as the AVIF advisory addressed in the previous commit.

This also collapses a duplicate install: Next 16.3.4 depends on
sharp ^0.35.3, so with the root pinned at 0.35.3 bun kept a second
nested copy at 0.35.4, loading two libvips builds into one process and
warning about duplicate GNotificationCenterDelegate classes. Both now
resolve to a single 0.35.4.

Verified: sharp loads its native binary and round-trips an AVIF encode
and decode on libvips 8.18.6, plus all 46 audits, the full app test
suite, and a production build.

* fix(deps): bump js-yaml to 4.3.2 for merge-key CPU exhaustion

Resolves Dependabot alerts #229 and #237 (GHSA-2883-xcg3-v3hh).
maxTotalMergeKeys did not count empty mappings, so a small document
could merge a large sequence of them repeatedly and burn CPU without
ever reaching the configured limit.

The path is reachable: both YAML entry points, lib/file-parsers and
lib/chunkers, call yaml.load with the default schema, which enables
merge keys, and both run on user-supplied files. Confirmed against the
advisory proof of concept, which took 13s on 4.3.1 and is now refused
in 6ms.

Not a breaking change for real documents. The fix charges one extra
budget unit per merge source against a default maxTotalMergeKeys of
10000, so only pathological documents newly fail; a 200-merge document
over a 20-key anchor spends 4200 units and still loads. Ordinary merge
and anchor resolution is unchanged.

* fix(deps): bump nodemailer to 9.1.1 for four address-handling advisories

Resolves Dependabot alerts #227, #231, #232 and #233.

- GHSA-8m3c-c648-2xjj: quadratic addressparser complexity, remote DoS
  via a crafted address list
- GHSA-cc9r-2j5m-2m83: IDN/Punycode domain allow-list bypass
- GHSA-2x7j-588g-ccc2: RFC 5322 comment mis-parsing, both leading to
  delivery to an attacker-controlled domain
- GHSA-wmmp-3585-3rmp: resolveContent bypassed disableFileAccess and
  disableUrlAccess on the legacy signature

9.0.1 to 9.1.1 stays inside v9. Checked the two changes that could have
altered behavior:

- The new maxRecipients cap defaults to 100000 and is documented as a
  backstop, not a delivery policy, so no real send reaches it.
- The tightened resolveContent access sandbox only governs attachments
  given as a file path or URL. Sim passes attachment content as buffers
  in lib/messaging/email/providers, so the sandbox never applies.

Address parsing is unchanged for plain, display-name, quoted-comma,
multi-recipient, plus-tagged and unicode forms.

Verified: type-check, lint, all 46 audits, and the 130 tests covering
lib/messaging/email and lib/internal/smtp.

* fix(deps): bump csv-parse to 7.0.2 for prototype replacement via columns

Resolves Dependabot alert #225 (GHSA-8cw4-87c7-c6xx). With columns and
group_columns_by_name enabled, a duplicated __proto__ header made the
duplicate-column branch assign through the __proto__ setter and replace
the parsed record's prototype with attacker-controlled data. 7.0.2 fixes
it with an Object.hasOwn duplicate check and Object.defineProperty.

Despite crossing a major, this is not a breaking upgrade: the
maintainers state that 7.0.0 "was published by mistake, there is no
breaking changes."

One real behavior change does land in the 6.1.0 to 7.0.2 range: trim now
aligns with ECMAScript whitespace, so a value padded with non-ASCII
whitespace such as U+00A0 is trimmed where it previously was not. Diffed
both versions over plain, padded, CRLF, quoted-comma, embedded-tab,
unicode-whitespace, ragged, BOM, blank-line and embedded-newline inputs
under the exact options Sim passes: the unicode-whitespace case is the
only difference, and it moves toward JavaScript trim semantics. Record
structure, headers and field splitting are byte-identical.

Sim never sets group_columns_by_name, so the vulnerable branch was not
reachable, but every CSV entry point does pass columns and trim on
user-supplied files.

Verified: type-check, lint, all 46 audits, and the 1946 tests across
lib/file-parsers, lib/table and lib/copilot/request/tools.

* fix(deps): dedupe js-yaml so no 4.3.1 copy remains in the tree

Pinning the two direct dependents to 4.3.2 left nine transitive
consumers pinned to their own nested 4.3.1, because bun does not
re-resolve a lockfile entry that still satisfies its range. The tree
therefore kept a vulnerable copy of the package the previous commit
was meant to remove.

Every one of those consumers asks for ^4.1.x, which 4.3.2 satisfies, so
the nesting was lockfile inertia rather than a real constraint. Dropping
the stale entries and reinstalling lets them all resolve to the single
hoisted 4.3.2. The two js-yaml 3.x consumers, artillery and gray-matter,
keep their own copy untouched.

Done this way rather than by deleting the lockfile, which re-resolves
every floating range and churned 1130 unrelated lines, or by a global
override, which would force v4 onto those two v3 consumers. This diff
removes nine lines and changes nothing else.

Verified: js-yaml 4.3.1 no longer resolves anywhere in the tree, the
docs site still builds its 700+ pages through fumadocs, and the desktop
suite covering electron-updater passes its 1600 tests.
* feat(sso): several identity providers per organization

An organization can now run more than one identity provider, one per
verified domain: Okta for eng.acme.com and Entra for acme.com, for example.
The schema already allowed several rows; the product could not show, pick,
or remove them.

- Sign-in names the provider explicitly. A new POST /api/auth/sso/resolve
  maps an email domain to the provider that serves it, preferring a verified
  domain and breaking ties on provider id, so routing no longer depends on
  the SSO plugin's unordered domain lookup.
- Registration refuses a second provider on a domain the caller already
  routes (SSO_DOMAIN_ALREADY_ROUTED), keeping email-domain routing
  deterministic. The check shares the existing cross-tenant domain read.
- DELETE /api/auth/sso/providers/[providerId], owned by Sim since the
  plugin's delete-provider stays blocked: organization owners and admins
  remove an organization provider, the creator a personal one. Accounts and
  memberships the provider admitted are untouched.
- The provider list is ordered by provider id; the settings sign-in tab
  lists providers, opens one by URL (`provider=`), adds another, and
  deletes with confirmation. JIT admissions record the provider id in
  their audit metadata.
- Docs describe multiple providers, domain routing, and deletion.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CkZjSKgtFdE5mzsQ31gGLY

* improvement(sso): verified multi-provider flow and cleaner provider settings

- Registration guard uses the same domain expression as sign-in resolution and domain verification
- Self-host registration script stores the normalized provider domain
- Sign-in reports "no provider" only on 404; other failures keep the generic message
- Settings: canonical back slot and title on provider detail and form, Edit then Delete, no duplicate Open in the row menu, awaited list refetch before navigating, replace-history on close, unsaved-changes guard on back
- Docs: state that an organization can use more than one identity provider

* fix(sso): make one provider per domain hold at the database and resolve only verified providers

- Partial unique index on sso_provider (organization_id, normalized domain), built concurrently after a duplicate pre-check; a lost race maps to the same 409 as the pre-check
- Sign-in resolution returns only providers whose domain is verified
- Settings controls follow the organization owner/admin model the server enforces, not the creator

* fix(sso): support registered provider IDs in settings

* refactor(sso): keep provider deletion in details

* chore(db): remove SSO migration before staging update

* chore(db): regenerate SSO migration after staging

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* Improve organization search ranking and bound rerank admission

* improvement(search): reduce embedding and retrieval overhead

* fix(search): align boundary test fixtures with search adapters

* improvement(search): preserve existing ranking policy
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner September 9, 2026 18:35
@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review (230 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 9, 2026 7:12pm UTC

Request Review

Comment thread apps/sim/lib/slack-search/assistant-stream.ts
@waleedlatif1
waleedlatif1 merged commit 5552aaf into main Sep 9, 2026
55 of 56 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.

4 participants