diff --git a/apps/app/public/onboarding/cloud-tests.png b/apps/app/public/onboarding/cloud-tests.png new file mode 100644 index 0000000000..9bf69f8789 Binary files /dev/null and b/apps/app/public/onboarding/cloud-tests.png differ diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/tests/all/layout.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/tests/all/layout.tsx index f07a4308bf..07a5f7742e 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/tests/all/layout.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/tests/all/layout.tsx @@ -1,7 +1,9 @@ import { auth } from "@/auth"; import { getI18n } from "@/locales/server"; import { SecondaryMenu } from "@bubba/ui/secondary-menu"; - +import { AppOnboarding } from "@/components/app-onboarding"; +import { db } from "@bubba/db"; +import { cache, Suspense } from "react"; export default async function Layout({ children, }: { @@ -11,6 +13,42 @@ export default async function Layout({ const session = await auth(); const organizationId = session?.user?.organizationId; + const tests = await getTestsOverview(); + console.log(tests); + + if (!tests.length) { + return ( +
+ Loading...
}> +
+ +
+ + + ); + } + return (
); } + +const getTestsOverview = cache(async () => { + const session = await auth(); + const orgId = session?.user.organizationId; + + const tests = await db.organizationIntegrationResults.findMany({ + where: { + organizationId: orgId, + }, + }); + + return tests; +}); diff --git a/apps/app/src/components/app-onboarding.tsx b/apps/app/src/components/app-onboarding.tsx index a477b73596..6a7892d221 100644 --- a/apps/app/src/components/app-onboarding.tsx +++ b/apps/app/src/components/app-onboarding.tsx @@ -68,11 +68,13 @@ export function AppOnboarding({ title, description, cta, imageSrc, imageAlt, faq
- + {cta && ( + + )} diff --git a/apps/app/src/locales/onboarding/app-onboarding.ts b/apps/app/src/locales/onboarding/app-onboarding.ts index fa1f0931c2..cc3c1f6820 100644 --- a/apps/app/src/locales/onboarding/app-onboarding.ts +++ b/apps/app/src/locales/onboarding/app-onboarding.ts @@ -60,4 +60,18 @@ export const app_onboarding = { "For SOC 2, you need to document employee onboarding/offboarding processes, track access to systems and data, maintain records of security training, and demonstrate that employees understand their security responsibilities. This helps auditors verify your security controls and personnel management practices.", }, }, + cloud_tests: { + title: "Cloud Security Testing", + description: "Test and validate your cloud infrastructure security.", + cta: "Create your first cloud test", + learn_more: "Learn more", + faqs: { + question_1: "What are cloud security tests?", + answer_1: "Cloud security tests are automated assessments that evaluate your cloud infrastructure for security vulnerabilities, misconfigurations, and compliance with security best practices.", + question_2: "Why are cloud security tests important?", + answer_2: "Cloud security tests help identify potential security risks in your cloud environment, ensure compliance with security standards, and provide evidence of your security controls for auditors. They're essential for maintaining a strong security posture in cloud environments.", + question_3: "What types of cloud tests are available?", + answer_3: "Cloud security tests can include infrastructure scanning, configuration analysis, vulnerability assessments, and compliance checks. These tests help ensure your cloud resources are properly secured and configured according to best practices.", + }, + }, } as const;