Skip to content

v0.5.18: ui fixes, nextjs16, workspace notifications, admin APIs, loading improvements, new slack tools - #2213

Merged
icecrasher321 merged 19 commits into
mainfrom
staging
Dec 5, 2025
Merged

icecrasher321 merged 19 commits into
mainfrom
staging

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

waleedlatif1 and others added 16 commits December 4, 2025 14:10
* fix(enterprise): seats need to be picked up from metadata not column

* fix env var access

* fix user avatar
* fix: trigger-save delete modal

* improvement: old modal styling
* chore(deps): upgrade to nextjs 16

* upgraded fumadocs

* ensure vercel uses bun

* fix build

* fix bui;d

* remove redundant vercel.json
…ail, webhook notifications for workflow execution (#2157)

* feat(notification): slack, email, webhook notifications from logs

* retain search params for filters to link in notification

* add alerting rules

* update selector

* fix lint

* add limits on num of emails and notification triggers per workspace

* address greptile comments

* add search to combobox

* move notifications to react query

* fix lint

* fix email formatting

* add more alert types

* fix imports

* fix test route

* use emcn componentfor modal

* refactor: consolidate notification config fields into jsonb objects

* regen migration

* fix delete notif modal ui

* make them multiselect dropdowns

* update tag styling

* combobox font size with multiselect tags'
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
…server side execution correctly (#2197)

* fix(env-var-resolution): new executor env var resolution changes

* add sessionuser id"

* cleanup code

* add doc update

* fix build

* fix client session pass through"

* add type change

* fix env var with hitl

* fix types
* Superagent poc

* Checkpoint brokeN

* tool call rag

* Fix

* Fixes

* Improvements

* Creds stuff

* Fix

* Fix tools

* Fix stream

* Prompt

* Update sheets descriptions

* Better

* Copilot components

* Delete stuff

* Remove db migration

* Fix migrations

* Fix things

* Copilot side superagent

* Build workflow from chat

* Combine superagent into copilkot

* Render tools

* Function execution

* Max mode indicators

* Tool call confirmations

* Credential settings

* Remove betas

* Bump version

* Dropdown options in block metadata

* Copilot kb tools

* Fix lint

* Credentials modal

* Fix lint

* Cleanup

* Env var resolution in superagent tools

* Get id for workflow vars

* Fix insert into subflow

* Fix executor for while and do while loops

* Fix metadata for parallel

* Remove db migration

* Rebase

* Add migrations back

* Clean up code

* Fix executor logic issue

* Cleanup

* Diagram tool

* Fix tool naems

* Comment out g3p

* Remove popup option

* Hide o3

* Remove db migration

* Fix merge conflicts

* Fix lint

* Fix tests

* Remove webhook change

* Remove cb change

* Fix lint

* Fix

* Fix lint

* Fix build

* comment out gemini

* Add gemini back

* Remove bad test

* Fix

* Fix test

* Fix

* Nuke bad test

* Fix lint

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
* improvement: loading, optimistic operations

* improvement: folders update

* fix usage indicator rounding + new tsconfig

* remove redundant checks

* fix hmr case for missing workflow loads

* add abstraction for zustand/react hybrid optimism

* remove comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
* Fix import/export

* Remove copilot gdrive tools

* Null

* Fix lint

* Add copilot validation

* Fix validation
@greptile-apps

greptile-apps Bot commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Skipped: This PR changes more files than the configured file change limit: (216 files found, 100 file limit)

@vercel

vercel Bot commented Dec 5, 2025 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Dec 5, 2025 9:54pm

Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
*/
function constantTimeCompare(a: string, b: string): boolean {
const aHash = createHash('sha256').update(a).digest()
const bHash = createHash('sha256').update(b).digest()

Check failure

Code scanning / CodeQL

Use of password hash with insufficient computational effort

Password from [an access to ADMIN_API_KEY](1) is hashed insecurely.

Copilot Autofix

AI 12 months ago

In this file (apps/sim/app/api/v1/admin/auth.ts), the code currently uses SHA-256 hashing to compare secrets for timing-safe equality. This approach, while suitable for general data, is not secure enough if the secret is a password or a value with potentially limited entropy, as in the case of an environment variable set to a human-chosen password. For maximum resilience and to avoid the risk of brute-force attacks, it should use a computationally expensive password hashing algorithm such as bcrypt (built for password/secrets comparison).

Update the constantTimeCompare function to use bcrypt for comparison. This requires the admin key to be stored as a bcrypt hash in the environment variable (instead of plaintext) and then comparing the provided key using bcrypt’s verification method. Specifically:

  • Add an import for a bcrypt library (bcryptjs is recommended for pure JS, but bcrypt is fine if compiled code is allowed).
  • Update constantTimeCompare(a, b):
    • Instead of hashing and comparing, use bcrypt.compareSync(a, b), where b is the bcrypt hash of the admin key, and a is the provided key.
  • Warn administrators via code comments and error messages that the environment variable must now be a bcrypt hash of the intended admin key, and provide information in the error path if it is not correctly formatted.

Files/regions to change:

  • apps/sim/app/api/v1/admin/auth.ts, lines 11 (add import), and 75-79 (constantTimeCompare implementation).

Suggested changeset 2
apps/sim/app/api/v1/admin/auth.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/sim/app/api/v1/admin/auth.ts b/apps/sim/app/api/v1/admin/auth.ts
--- a/apps/sim/app/api/v1/admin/auth.ts
+++ b/apps/sim/app/api/v1/admin/auth.ts
@@ -8,7 +8,8 @@
  *   curl -H "x-admin-key: your_admin_key" https://your-instance/api/v1/admin/...
  */
 
-import { createHash, timingSafeEqual } from 'crypto'
+import { timingSafeEqual } from 'crypto'
+import bcrypt from 'bcryptjs'
 import type { NextRequest } from 'next/server'
 import { env } from '@/lib/core/config/env'
 import { createLogger } from '@/lib/logs/console/logger'
@@ -72,8 +73,13 @@
  * @param b - Second string to compare
  * @returns True if strings are equal, false otherwise
  */
-function constantTimeCompare(a: string, b: string): boolean {
-  const aHash = createHash('sha256').update(a).digest()
-  const bHash = createHash('sha256').update(b).digest()
-  return timingSafeEqual(aHash, bHash)
+// Compares plain admin key to bcrypt hash stored in env.ADMIN_API_KEY
+function constantTimeCompare(providedKey: string, storedHash: string): boolean {
+  try {
+    return bcrypt.compareSync(providedKey, storedHash)
+  } catch (err) {
+    // If ADMIN_API_KEY is not a bcrypt hash, this will throw
+    logger.error('ADMIN_API_KEY is not a valid bcrypt hash. Please set it to a bcrypt hash of your admin key.')
+    return false
+  }
 }
EOF
@@ -8,7 +8,8 @@
* curl -H "x-admin-key: your_admin_key" https://your-instance/api/v1/admin/...
*/

import { createHash, timingSafeEqual } from 'crypto'
import { timingSafeEqual } from 'crypto'
import bcrypt from 'bcryptjs'
import type { NextRequest } from 'next/server'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
@@ -72,8 +73,13 @@
* @param b - Second string to compare
* @returns True if strings are equal, false otherwise
*/
function constantTimeCompare(a: string, b: string): boolean {
const aHash = createHash('sha256').update(a).digest()
const bHash = createHash('sha256').update(b).digest()
return timingSafeEqual(aHash, bHash)
// Compares plain admin key to bcrypt hash stored in env.ADMIN_API_KEY
function constantTimeCompare(providedKey: string, storedHash: string): boolean {
try {
return bcrypt.compareSync(providedKey, storedHash)
} catch (err) {
// If ADMIN_API_KEY is not a bcrypt hash, this will throw
logger.error('ADMIN_API_KEY is not a valid bcrypt hash. Please set it to a bcrypt hash of your admin key.')
return false
}
}
apps/sim/package.json
Outside changed files

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/sim/package.json b/apps/sim/package.json
--- a/apps/sim/package.json
+++ b/apps/sim/package.json
@@ -131,7 +131,8 @@
     "uuid": "^11.1.0",
     "xlsx": "0.18.5",
     "zod": "^3.24.2",
-    "zustand": "^4.5.7"
+    "zustand": "^4.5.7",
+    "bcryptjs": "^3.0.3"
   },
   "devDependencies": {
     "@testing-library/jest-dom": "^6.6.3",
EOF
@@ -131,7 +131,8 @@
"uuid": "^11.1.0",
"xlsx": "0.18.5",
"zod": "^3.24.2",
"zustand": "^4.5.7"
"zustand": "^4.5.7",
"bcryptjs": "^3.0.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.6.3",
This fix introduces these dependencies
Package Version Security advisories
bcryptjs (npm) 3.0.3 None
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
* Fix validation error

* Fix lint
* fix(custom-bot-slack): dependsOn incorrectly set for bot_token"

* fix other references to be compatible

* fix dependsOn for things depending on authMethod"
@icecrasher321
icecrasher321 merged commit 6cd078b into main Dec 5, 2025

This branch was previously deployed

1 inactive deployment
Preview — fb4c9827 Deployed Dec 5, 2025 by vercel[bot]
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.

5 participants