diff --git a/apps/api/src/cloud-security/cloud-security-query.service.ts b/apps/api/src/cloud-security/cloud-security-query.service.ts index ca8cb85164..9dea252410 100644 --- a/apps/api/src/cloud-security/cloud-security-query.service.ts +++ b/apps/api/src/cloud-security/cloud-security-query.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { db } from '@db'; import { getManifest } from '@trycompai/integration-platform'; -const CLOUD_PROVIDER_CATEGORY = 'Cloud'; +const CLOUD_PROVIDER_SLUGS = ['aws', 'gcp', 'azure'] as const; /** Scan window for filtering legacy results to latest scan only */ const SCAN_WINDOW_MS = 10 * 60 * 1000; // 10 minutes @@ -88,7 +88,7 @@ export class CloudSecurityQueryService { where: { organizationId, status: 'active', - provider: { category: CLOUD_PROVIDER_CATEGORY }, + provider: { slug: { in: [...CLOUD_PROVIDER_SLUGS] } }, }, include: { provider: true }, }); @@ -98,10 +98,9 @@ export class CloudSecurityQueryService { where: { organizationId }, }); - const activeLegacy = legacyIntegrations.filter((i) => { - const manifest = getManifest(i.integrationId); - return manifest?.category === CLOUD_PROVIDER_CATEGORY; - }); + const activeLegacy = legacyIntegrations.filter((i) => + (CLOUD_PROVIDER_SLUGS as readonly string[]).includes(i.integrationId), + ); // Map new connections const newProviders: CloudProvider[] = newConnections.map((conn) => { @@ -207,7 +206,7 @@ export class CloudSecurityQueryService { where: { organizationId, status: 'active', - provider: { category: CLOUD_PROVIDER_CATEGORY }, + provider: { slug: { in: [...CLOUD_PROVIDER_SLUGS] } }, }, include: { provider: true }, }); @@ -303,10 +302,9 @@ export class CloudSecurityQueryService { where: { organizationId }, }); - const activeLegacy = legacyIntegrations.filter((i) => { - const manifest = getManifest(i.integrationId); - return manifest?.category === CLOUD_PROVIDER_CATEGORY; - }); + const activeLegacy = legacyIntegrations.filter((i) => + (CLOUD_PROVIDER_SLUGS as readonly string[]).includes(i.integrationId), + ); const legacyIds = activeLegacy.map((i) => i.id); if (legacyIds.length === 0) return []; diff --git a/apps/app/src/app/(app)/[orgId]/integrations/components/PlatformIntegrations.tsx b/apps/app/src/app/(app)/[orgId]/integrations/components/PlatformIntegrations.tsx index d099fc24af..ecee3f8027 100644 --- a/apps/app/src/app/(app)/[orgId]/integrations/components/PlatformIntegrations.tsx +++ b/apps/app/src/app/(app)/[orgId]/integrations/components/PlatformIntegrations.tsx @@ -659,12 +659,6 @@ export function PlatformIntegrations({ className, taskTemplates }: PlatformInteg {provider.description} - {provider.category === 'Cloud' && ( -

- This integration is used exclusively for Cloud Security Tests. -

- )} - {/* Mapped tasks */} {provider.mappedTasks && provider.mappedTasks.length > 0 && (
diff --git a/apps/app/src/components/integrations/ConnectIntegrationDialog.tsx b/apps/app/src/components/integrations/ConnectIntegrationDialog.tsx index 5a493f955e..4a5befdb36 100644 --- a/apps/app/src/components/integrations/ConnectIntegrationDialog.tsx +++ b/apps/app/src/components/integrations/ConnectIntegrationDialog.tsx @@ -555,11 +555,6 @@ export function ConnectIntegrationDialog({

{provider.setupInstructions}

)} - {provider?.category === 'Cloud' && !provider?.setupScript && ( -
- This integration will only be used for Cloud Security Tests. Your credentials are encrypted and used exclusively to run read-only security scans. -
- )} {allFields .filter((field) => { if (!provider?.setupScript) return true;