Skip to content

Commit 34b1a18

Browse files
authored
fix: security release 2026-07-06 (#4199)
1 parent bb450e6 commit 34b1a18

88 files changed

Lines changed: 7947 additions & 5575 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
fix(cli): honor the MCP server's `--dev-only` flag
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Harden account and access-control handling across auth, RBAC, org membership, and impersonation
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Harden URL handling for alert webhooks and platform notifications
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Harden the query and prompt-override APIs and rate-limit the query ai-title endpoint
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Improve redaction of secrets from debug logs
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Tighten environment scoping when replaying a run.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Scope run, batch, and trigger lookups to the caller's tenant

apps/webapp/app/components/navigation/HelpAndFeedbackPopover.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { QuestionMarkIcon } from "~/assets/icons/QuestionMarkIcon";
88
import { RadarPulseIcon } from "~/assets/icons/RadarPulseIcon";
99
import { StarIcon } from "~/assets/icons/StarIcon";
1010
import { useShortcutKeys } from "~/hooks/useShortcutKeys";
11+
import { sanitizeHttpUrl } from "~/utils/sanitizeUrl";
1112
import { useCurrentPlan } from "~/routes/_app.orgs.$organizationSlug/route";
1213
import { useRecentChangelogs } from "~/routes/resources.platform-changelogs";
1314
import { cn } from "~/utils/cn";
@@ -158,7 +159,7 @@ export function HelpAndFeedback({
158159
trailingIconClassName="text-text-dimmed"
159160
inactiveIconColor="text-text-dimmed"
160161
activeIconColor="text-text-dimmed"
161-
to={entry.actionUrl ?? "https://trigger.dev/changelog"}
162+
to={sanitizeHttpUrl(entry.actionUrl) ?? "https://trigger.dev/changelog"}
162163
target="_blank"
163164
/>
164165
))}

apps/webapp/app/models/member.server.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -74,43 +74,6 @@ export async function getTeamMembersAndInvites({
7474
return { members: org.members, invites: org.invites };
7575
}
7676

77-
export async function removeTeamMember({
78-
userId,
79-
slug,
80-
memberId,
81-
}: {
82-
userId: string;
83-
slug: string;
84-
memberId: string;
85-
}) {
86-
const org = await prisma.organization.findFirst({
87-
where: { slug, members: { some: { userId } } },
88-
});
89-
90-
if (!org) {
91-
throw new Error("User does not have access to this organization");
92-
}
93-
94-
// Scope the target to this org. A member id is a globally unique key, so
95-
// deleting by id alone would remove members of other orgs; bind it to the
96-
// resolved org and reject a foreign id.
97-
const member = await prisma.orgMember.findFirst({
98-
where: { id: memberId, organizationId: org.id },
99-
include: {
100-
organization: true,
101-
user: true,
102-
},
103-
});
104-
105-
if (!member) {
106-
throw new Error("Member not found in this organization");
107-
}
108-
109-
await prisma.orgMember.delete({ where: { id: member.id } });
110-
111-
return member;
112-
}
113-
11477
export async function inviteMembers({
11578
slug,
11679
emails,

apps/webapp/app/models/orgIntegration.server.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { z } from "zod";
99
import { $transaction, prisma } from "~/db.server";
1010
import { env } from "~/env.server";
1111
import { logger } from "~/services/logger.server";
12+
import { slackSecretLogFields } from "./safeIntegrationLog";
13+
import { slackAccessResultLogFields } from "./slackOAuthResultLog";
1214
import { getSecretStore } from "~/services/secrets/secretStore.server";
1315
import { commitSession, getUserSession } from "~/services/sessionStorage.server";
1416
import { generateFriendlyId } from "~/v3/friendlyIdentifiers";
@@ -205,9 +207,8 @@ export class OrgIntegrationRepository {
205207
});
206208

207209
if (result.ok) {
208-
logger.debug("Received slack access token", {
209-
result,
210-
});
210+
// `result` carries Slack tokens; log only non-secret diagnostics.
211+
logger.debug("Received slack access token", slackAccessResultLogFields(result));
211212

212213
if (!result.access_token) {
213214
throw new Error("Failed to get access token");
@@ -230,9 +231,12 @@ export class OrgIntegrationRepository {
230231
raw: result,
231232
};
232233

233-
logger.debug("Setting secret", {
234-
secretValue,
235-
});
234+
// `secretValue` carries the tokens encrypted below; log only
235+
// non-secret fields.
236+
logger.debug(
237+
"Setting secret",
238+
slackSecretLogFields(integrationFriendlyId, secretValue)
239+
);
236240

237241
await secretStore.setSecret(integrationFriendlyId, secretValue);
238242

0 commit comments

Comments
 (0)