Skip to content

Commit 9f2d39f

Browse files
authored
Merge pull request #2731 from trycompai/main
[comp] Production Deploy
2 parents a4ccab5 + d5311a3 commit 9f2d39f

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

‎apps/api/src/cloud-security/cloud-security-query.service.ts‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
22
import { db } from '@db';
33
import { getManifest } from '@trycompai/integration-platform';
44

5-
const CLOUD_PROVIDER_CATEGORY = 'Cloud';
5+
const CLOUD_PROVIDER_SLUGS = ['aws', 'gcp', 'azure'] as const;
66

77
/** Scan window for filtering legacy results to latest scan only */
88
const SCAN_WINDOW_MS = 10 * 60 * 1000; // 10 minutes
@@ -88,7 +88,7 @@ export class CloudSecurityQueryService {
8888
where: {
8989
organizationId,
9090
status: 'active',
91-
provider: { category: CLOUD_PROVIDER_CATEGORY },
91+
provider: { slug: { in: [...CLOUD_PROVIDER_SLUGS] } },
9292
},
9393
include: { provider: true },
9494
});
@@ -98,10 +98,9 @@ export class CloudSecurityQueryService {
9898
where: { organizationId },
9999
});
100100

101-
const activeLegacy = legacyIntegrations.filter((i) => {
102-
const manifest = getManifest(i.integrationId);
103-
return manifest?.category === CLOUD_PROVIDER_CATEGORY;
104-
});
101+
const activeLegacy = legacyIntegrations.filter((i) =>
102+
(CLOUD_PROVIDER_SLUGS as readonly string[]).includes(i.integrationId),
103+
);
105104

106105
// Map new connections
107106
const newProviders: CloudProvider[] = newConnections.map((conn) => {
@@ -207,7 +206,7 @@ export class CloudSecurityQueryService {
207206
where: {
208207
organizationId,
209208
status: 'active',
210-
provider: { category: CLOUD_PROVIDER_CATEGORY },
209+
provider: { slug: { in: [...CLOUD_PROVIDER_SLUGS] } },
211210
},
212211
include: { provider: true },
213212
});
@@ -303,10 +302,9 @@ export class CloudSecurityQueryService {
303302
where: { organizationId },
304303
});
305304

306-
const activeLegacy = legacyIntegrations.filter((i) => {
307-
const manifest = getManifest(i.integrationId);
308-
return manifest?.category === CLOUD_PROVIDER_CATEGORY;
309-
});
305+
const activeLegacy = legacyIntegrations.filter((i) =>
306+
(CLOUD_PROVIDER_SLUGS as readonly string[]).includes(i.integrationId),
307+
);
310308

311309
const legacyIds = activeLegacy.map((i) => i.id);
312310
if (legacyIds.length === 0) return [];

‎apps/app/src/app/(app)/[orgId]/integrations/components/PlatformIntegrations.tsx‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -659,12 +659,6 @@ export function PlatformIntegrations({ className, taskTemplates }: PlatformInteg
659659
{provider.description}
660660
</CardDescription>
661661

662-
{provider.category === 'Cloud' && (
663-
<p className="text-xs text-muted-foreground italic">
664-
This integration is used exclusively for Cloud Security Tests.
665-
</p>
666-
)}
667-
668662
{/* Mapped tasks */}
669663
{provider.mappedTasks && provider.mappedTasks.length > 0 && (
670664
<div className="flex flex-wrap gap-1.5">

‎apps/app/src/components/integrations/ConnectIntegrationDialog.tsx‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,6 @@ export function ConnectIntegrationDialog({
555555
<p className="whitespace-pre-wrap text-xs break-words">{provider.setupInstructions}</p>
556556
</div>
557557
)}
558-
{provider?.category === 'Cloud' && !provider?.setupScript && (
559-
<div className="text-xs text-muted-foreground bg-muted/50 p-3 rounded-md">
560-
This integration will only be used for Cloud Security Tests. Your credentials are encrypted and used exclusively to run read-only security scans.
561-
</div>
562-
)}
563558
{allFields
564559
.filter((field) => {
565560
if (!provider?.setupScript) return true;

0 commit comments

Comments
 (0)