Skip to content

fix: security release 2026-08-12 - #4735

Merged
carderne merged 7 commits into
mainfrom
security-release/2026-08-12
Aug 20, 2026
Merged

fix: security release 2026-08-12#4735
carderne merged 7 commits into
mainfrom
security-release/2026-08-12

Conversation

@carderne

Copy link
Copy Markdown
Collaborator

Security release batch. Advisory details to be published with the release.

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 753d4a1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@carderne
carderne marked this pull request as ready for review August 20, 2026 11:25
@carderne
carderne enabled auto-merge (squash) August 20, 2026 11:25
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The changes add session-bound Slack OAuth state management, invite and authentication rate limits, dashboard-agent metadata and repository snapshot validation, environment-scoped waitpoint authorization, and TRQL rejection of PREWHERE queries. Tests cover OAuth replay protection, rate-limit-related behavior, trusted dashboard-agent metadata, snapshot URL and archive validation, waitpoint authorization, and query rejection. Change records document the webhook and TRQL updates.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description is on-topic but omits the required issue, checklist, testing, changelog, and screenshots sections. Add the required template sections and document testing steps, changelog details, checklist status, linked issue, and screenshots or state that none apply.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies this changeset as a security release batch and includes its release date.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch security-release/2026-08-12

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread internal-packages/dashboard-agent/src/repo-tools.ts

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/webapp/test/dashboardAgentClientMetadata.test.ts (1)

3-55: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Replace mocked route tests with testcontainer coverage.

These changes test security boundaries through module mocks. This violates the repository test policy. apps/webapp/test/dashboardAgentClientMetadata.test.ts also imports the dashboard-agent route, which indirectly imports ~/env.server.

  • apps/webapp/test/dashboardAgentClientMetadata.test.ts#L3-L55: Remove vi.mock-based route setup. Pass configuration through options and use testcontainers for required services.
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts#L137-L170: Test metadata persistence and session startup through testcontainer-backed dependencies instead of mock call arguments.

As per coding guidelines, “We use vitest exclusively. Never mock anything - use testcontainers instead.” As per coding guidelines, “Test files must not import app/env.server.ts; pass configuration as options instead.”

Source: Coding guidelines

🧹 Nitpick comments (1)
internal-packages/tsql/src/query/security.test.ts (1)

213-215: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the QueryError type as well as the message.

A generic Error with the same message would pass these tests. Assert that compilation throws QueryError, defined in internal-packages/tsql/src/query/errors.ts, and retain the message assertion.

🔇 Additional comments (25)
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx (1)

82-116: LGTM!

Also applies to: 174-180

apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts (1)

2-4: LGTM!

Also applies to: 67-68, 150-151, 203-204

apps/webapp/app/services/inviteRateLimiter.server.ts (1)

19-73: LGTM!

apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts (1)

11-11: LGTM!

Also applies to: 52-56, 180-184

apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx (1)

31-31: LGTM!

Also applies to: 180-195

apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts (1)

6-6: LGTM!

Also applies to: 61-80

apps/webapp/app/routes/invite-resend.tsx (1)

6-7: LGTM!

Also applies to: 54-70

apps/webapp/app/routes/login.magic/route.tsx (1)

32-32: LGTM!

apps/webapp/app/routes/resources.account.mfa.setup/route.tsx (1)

12-12: LGTM!

Also applies to: 141-148

apps/webapp/app/models/slackOAuthState.server.ts (2)

27-37: LGTM!

Also applies to: 39-58, 60-86


120-139: LGTM!

apps/webapp/test/slackOAuthState.test.ts (1)

29-205: LGTM!

apps/webapp/app/models/orgIntegration.server.ts (1)

12-20: LGTM!

Also applies to: 142-196

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts (1)

47-55: LGTM!

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts (1)

42-48: LGTM!

apps/webapp/app/routes/integrations.$serviceName.callback.ts (1)

47-77: LGTM!

apps/webapp/test/slackOAuthCallback.test.ts (1)

1-87: LGTM!

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts (1)

603-621: LGTM!

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts (1)

45-47: LGTM!

internal-packages/dashboard-agent/src/agent-runtime.ts (1)

274-285: LGTM!

Also applies to: 327-327

internal-packages/dashboard-agent/src/dashboard-agent.test.ts (1)

1130-1158: LGTM!

internal-packages/dashboard-agent/src/repo-tools.test.ts (1)

197-216: LGTM!

internal-packages/tsql/src/query/printer.ts (2)

432-438: 🩺 Stability & Availability | ⚡ Quick win

⚠️ Unverified finding
Sandbox verification was unavailable.

Restore visitor state when rejecting PREWHERE.

visit() removes the node from stack and decrements indentLevel only after the visitor returns. This throw exits before cleanup. If a ClickHousePrinter instance is reused after a rejected query, the next print() can classify the query incorrectly and render invalid SQL. Move cleanup into finally, or confirm that failed printer instances are always discarded and add a reuse regression test.


511-512: LGTM!

.server-changes/reject-prewhere-in-trql.md (1)

1-6: LGTM!


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3dc2371f-ee18-44ba-97a0-acfb451f3dbc

📥 Commits

Reviewing files that changed from the base of the PR and between 518978b and 753d4a1.

📒 Files selected for processing (30)
  • .server-changes/reject-benchmarking-webhook-addresses.md
  • .server-changes/reject-prewhere-in-trql.md
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/models/slackOAuthState.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • internal-packages/dashboard-agent/src/agent-runtime.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.ts
  • internal-packages/tsql/src/query/printer.ts
  • internal-packages/tsql/src/query/security.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (35)
  • GitHub Check: report
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: fk-cascade-guard / fk-cascade-guard
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: 🛡️ E2E Auth Tests (full)
  • GitHub Check: Build and publish previews
🧰 Additional context used
📓 Path-based instructions (12)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

**/*.{ts,tsx}: Prefer static imports over dynamic imports. Only use dynamic import() when:

  • Circular dependencies cannot be resolved otherwise
  • Code splitting is genuinely needed for performance
  • The module must be loaded conditionally at runtime

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/tsql/src/query/security.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • internal-packages/dashboard-agent/src/agent-runtime.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • internal-packages/tsql/src/query/printer.ts
  • internal-packages/dashboard-agent/src/repo-tools.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use zod for validation in packages/core and apps/webapp

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/tsql/src/query/security.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • internal-packages/dashboard-agent/src/agent-runtime.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • internal-packages/tsql/src/query/printer.ts
  • internal-packages/dashboard-agent/src/repo-tools.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/tsql/src/query/security.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • internal-packages/dashboard-agent/src/agent-runtime.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • internal-packages/tsql/src/query/printer.ts
  • internal-packages/dashboard-agent/src/repo-tools.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/models/slackOAuthState.server.ts
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

apps/webapp/**/*.{ts,tsx}: Access environment variables through the env export of env.server.ts instead of directly accessing process.env
Use subpath exports from @trigger.dev/core package instead of importing from the root @trigger.dev/core path

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
apps/webapp/app/**/*.{ts,tsx}

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

apps/webapp/app/**/*.{ts,tsx}: For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.
Use useCallback and useMemo only for context provider values, expensive derived data used as a dependency, or stable references required by dependency arrays; do not wrap ordinary event handlers or trivial computations.
Use named constants for sentinel or placeholder values instead of scattering raw string literals across comparisons.

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
apps/webapp/app/routes/**/*.ts

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

apps/webapp/app/routes/**/*.ts: Use Remix flat-file route conventions with dot-separated segments; for example, api.v1.tasks.$taskId.trigger.ts maps to /api/v1/tasks/:taskId/trigger.
PAT-authenticated API routes must resolve their target organization or project within the caller's membership scope, using a membership filter or a helper such as findProjectByRef or resolveOrganizationForApiUser; RBAC authorization alone is insufficient.

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
apps/webapp/app/**/*.ts

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

apps/webapp/app/**/*.ts: Never use request.signal to detect client disconnects. Use getRequestAbortSignal() from app/services/httpAsyncStorage.server.ts, which is wired to Express response close events.
Access environment variables through the env export from app/env.server.ts; never use process.env directly.
Always use Prisma findFirst instead of findUnique.
Always use the $transaction helper from ~/db.server, never call prisma.$transaction or $replica.$transaction directly. Pass isolation levels as strings, use Serializable for correctness-critical read-then-write invariants, and guard possibly undefined helper results when a definite value is required.

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/models/slackOAuthState.server.ts
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Add crumbs as you write code — not just when debugging. Mark lines with
// @Crumbs or wrap blocks in `// `#region` `@crumbs. They stay on the
branch throughout development and are stripped by agentcrumbs strip
before merge.
Do not invent new namespaces — pick from this table or ask first.
Do not flag // @Crumbs markers, `#region `@crumbs blocks, or agentcrumbs
imports in reviews. These are temporary debug instrumentation stripped
before merge. Data logged in crumbs (IDs, names, values) never reaches
production.

Files:

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.errors.connect-to-slack.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.alerts.new.connect-to-slack.ts
  • apps/webapp/app/services/mfa/multiFactorAuthentication.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.in.$.ts
  • apps/webapp/app/routes/resources.account.mfa.setup/route.tsx
  • apps/webapp/app/routes/login.magic/route.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.dashboard-agent.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.invite/route.tsx
  • apps/webapp/app/routes/api.v1.orgs.$orgParam.invites.ts
  • apps/webapp/app/services/magicLinkRateLimiter.server.ts
  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/app/services/inviteRateLimiter.server.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/tsql/src/query/security.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • internal-packages/dashboard-agent/src/agent-runtime.ts
  • apps/webapp/app/routes/integrations.$serviceName.callback.ts
  • internal-packages/tsql/src/query/printer.ts
  • internal-packages/dashboard-agent/src/repo-tools.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
  • apps/webapp/app/routes/invite-resend.tsx
  • apps/webapp/app/models/orgIntegration.server.ts
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.waitpoints.$waitpointFriendlyId.complete/route.tsx
  • apps/webapp/app/models/slackOAuthState.server.ts
**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use vitest for all tests in the Trigger.dev repository

**/*.{test,spec}.{ts,tsx}: We use vitest exclusively. Never mock anything - use testcontainers instead.
Test files go next to source files (e.g., MyService.ts -> MyService.test.ts).

Files:

  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • internal-packages/tsql/src/query/security.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • internal-packages/dashboard-agent/src/repo-tools.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
apps/webapp/**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Do not import env.server.ts directly or indirectly into test files; instead pass environment-dependent values through options/parameters to make code testable

Files:

  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
apps/webapp/**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Test files must not import app/env.server.ts; pass configuration as options instead.

Files:

  • apps/webapp/test/slackOAuthCallback.test.ts
  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • apps/webapp/test/slackOAuthState.test.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
  • apps/webapp/test/waitpointCompleteRouteReplicaLag.guard.test.ts
🧠 Learnings (4)
📚 Learning: 2026-07-26T13:14:02.968Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 4378
File: .server-changes/realtime-run-reads-from-primary.md:0-0
Timestamp: 2026-07-26T13:14:02.968Z
Learning: For files in the .server-changes directory, the body text is published verbatim as dashboard-facing user release notes. Write entries in terms of user-visible behavior (what users can do/see), and avoid implementation-oriented details such as environment-variable names, internal mechanisms, or configuration knobs. If you need to include operational/configuration specifics, put those details in the PR description instead of the .server-changes entry.

Applied to files:

  • .server-changes/reject-benchmarking-webhook-addresses.md
  • .server-changes/reject-prewhere-in-trql.md
📚 Learning: 2026-05-18T14:40:02.173Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:02.173Z
Learning: In the triggerdotdev/trigger.dev repo, the policy “Never mock anything — use testcontainers instead” should only be enforced for integration tests that interact with real external services (e.g., Redis, Postgres) via actual infrastructure. For unit tests that exercise pure in-memory logic (e.g., cache semantics) it is OK to stub collaborators such as `ApiClient` using Vitest (`vi.fn()`) to assert call counts or control behavior. Do not flag `vi.fn()`-based `ApiClient` stubs in unit tests as violations of the testcontainers policy.

Applied to files:

  • apps/webapp/test/slackOAuthCallback.test.ts
📚 Learning: 2026-06-16T09:19:47.637Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3960
File: apps/webapp/test/prismaInfrastructureErrorCapture.test.ts:0-0
Timestamp: 2026-06-16T09:19:47.637Z
Learning: In this repo’s Vitest setup, `vitest.config.ts` uses `globals: true`, so identifiers like `vi`, `describe`, `it`, and `expect` are available as globals in Vitest test files. During code review, do not flag missing `vi`/`describe`/`it`/`expect` imports as a runtime error or correctness issue when they’re used in `*.test.ts/tsx` or `*.spec.ts/tsx` files. Explicit imports are still preferred for consistency, but they’re not required for runtime behavior.

Applied to files:

  • apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts
  • internal-packages/dashboard-agent/src/dashboard-agent.test.ts
  • apps/webapp/test/dashboardAgentClientMetadata.test.ts
  • apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
📚 Learning: 2026-05-12T21:04:05.815Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3542
File: apps/webapp/app/components/sessions/v1/SessionStatus.tsx:1-3
Timestamp: 2026-05-12T21:04:05.815Z
Learning: In this Remix + TypeScript codebase, do not flag a server/client boundary violation when a file imports only types from a module matching `*.server`.

Specifically, it’s safe to import types using `import type { Foo } from "*.server"` or `import { type Foo } from "*.server"` because TypeScript erases type-only imports at compile time and they emit no JavaScript, so they won’t cross the Remix server/client bundle boundary.

Only raise the boundary concern for value imports (e.g., `import { Foo }` without `type`, or `import Foo`), since those produce JavaScript output.

Applied to files:

  • apps/webapp/app/models/orgIntegration.server.ts
🪛 ast-grep (0.45.1)
internal-packages/dashboard-agent/src/repo-tools.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)


[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFile } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

internal-packages/dashboard-agent/src/repo-tools.test.ts

[warning] Importing child_process exposes a command-execution surface; ensure any command/argument built from input is validated, and prefer execFile/spawn with an argument array over exec.
Context: import { execFileSync } from "node:child_process";
Note: [CWE-78] Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

(detect-child-process-typescript)

Comment thread .server-changes/reject-benchmarking-webhook-addresses.md
Comment thread apps/webapp/app/models/slackOAuthState.server.ts
Comment thread apps/webapp/app/models/slackOAuthState.server.ts
Comment thread apps/webapp/app/services/inviteRateLimiter.server.ts
Comment thread apps/webapp/app/services/magicLinkRateLimiter.server.ts
Comment thread apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
Comment thread apps/webapp/test/waitpointCompleteRouteAuthorization.test.ts
Comment thread internal-packages/dashboard-agent/src/repo-tools.ts
@carderne
carderne merged commit 06f99ae into main Aug 20, 2026
69 checks passed
@carderne
carderne deleted the security-release/2026-08-12 branch August 20, 2026 11:34
@github-actions github-actions Bot mentioned this pull request Aug 20, 2026
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