Repository navigation
v0.5.18: ui fixes, nextjs16, workspace notifications, admin APIs, loading improvements, new slack tools - #2213
Conversation
waleedlatif1
commented
Dec 5, 2025
- fix(settings): fix long description on wordpress integration (fix(settings): fix long description on wordpress integration #2195)
- fix(envvar): fix envvar dropdown positioning, remove dead code (fix(envvar): fix envvar dropdown positioning, remove dead code #2196)
- fix(subscription): fixed text clipping on subscription panel (fix(subscription): fixed text clipping on subscription panel #2198)
- fix(profile-pics): remove sharp dependency for serving profile pics in settings (fix(profile-pics): remove sharp depenencey for serving profile pics in settings #2199)
- fix(enterprise-plan): seats should be taken from metadata (fix(enterprise-plan): seats should be taken from metadata #2200)
- improvement: modal UI (improvement: modal UI #2202)
- chore(deps): upgrade to nextjs 16 (chore(deps): upgrade to nextjs 16 #2203)
- feat(error-notifications): workspace-level configuration of slack, email, webhook notifications for workflow execution (feat(error-notifications): workspace-level configuration of slack, email, webhook notifications for workflow execution #2157)
- feat(i18n): update translations (feat(i18n): update translations #2204)
- fix(images): updated helm charts with branding URL guidance, removed additional nextjs image optimizations (fix(images): updated helm charts with branding URL guidance, removed additional nextjs image optimizations #2205)
- feat(admin): added admin APIs for admin management (feat(admin): added admin APIs for admin management #2206)
- fix(env-vars): refactor for workspace/personal env vars to work with server side execution correctly (fix(env-vars): refactor for workspace/personal env vars to work with server side execution correctly #2197)
- feat(copilot): superagent (feat(copilot): superagent #2201)
- improvement: loading, optimistic actions (improvement: loading, optimistic actions #2193)
- fix(import): fix array errors on import/export (fix(import): fix array errors on import/export #2211)
- feat(tools): added more slack tools (feat(tools): added more slack tools #2212)
* 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>
…additional nextjs image optimizations (#2205)
…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
|
Skipped: This PR changes more files than the configured file change limit: ( |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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
Show autofix suggestion
Hide autofix suggestion
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 (
bcryptjsis recommended for pure JS, butbcryptis fine if compiled code is allowed). - Update
constantTimeCompare(a, b):- Instead of hashing and comparing, use
bcrypt.compareSync(a, b), wherebis the bcrypt hash of the admin key, andais the provided key.
- Instead of hashing and comparing, use
- 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 (constantTimeCompareimplementation).
| @@ -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 | ||
| } | ||
| } |
| @@ -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", |
| Package | Version | Security advisories |
| bcryptjs (npm) | 3.0.3 | None |
* 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"