Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: remove counts endpoint and header stats

adilsonfa6ece915a34
diff --git a/backend/e2e-test/insights-counts.spec.ts b/backend/e2e-test/insights-counts.spec.ts
deleted file mode 100644
index 825ece1ad9..0000000000
--- a/backend/e2e-test/insights-counts.spec.ts
+++ /dev/null
@@ -1,250 +0,0 @@
-import { randomUUID } from "node:crypto";
-
-import { ForbiddenError } from "@casl/ability";
-import { Knex } from "knex";
-import { afterAll, beforeAll, describe, expect, test } from "vitest";
-
-import {
- ProjectType,
- ProjectVersion,
- TableName,
- TAppConnectionsInsert,
- TOrganizationsInsert,
- TProjectEnvironmentsInsert,
- TProjectsInsert,
- TSecretFoldersInsert,
- TSecretRotationsV2Insert,
- TSecretsV2Insert,
- TUsersInsert
-} from "@app/db/schemas";
-import { insightsDALFactory } from "@app/ee/services/insights/insights-dal";
-import { insightsServiceFactory } from "@app/ee/services/insights/insights-service";
-import { TOrgInsightsDTO } from "@app/ee/services/insights/insights-types";
-import { SecretRotationStatus } from "@app/ee/services/secret-rotation-v2/secret-rotation-v2-enums";
-import { ActorType, AuthMethod } from "@app/services/auth/auth-type";
-
-import { buildOrgInsightsGateStubs, passThroughKeyStore, projectScopedInsightsDepStubs } from "./testUtils/insights";
-
-declare const testDb: Knex;
-
-const ORG_ID = randomUUID();
-const OTHER_ORG_ID = randomUUID();
-const suffix = randomUUID().slice(0, 8);
-
-const USER_ID = randomUUID();
-const CONNECTION_ID = randomUUID();
-
-// One project per scoping rule of countOrgSecretsResources. Only `smA` and `smB` may contribute.
-const projects = {
- // Two environments, one of them soft-deleted; secrets and a rotation behind each
- smA: {
- projectId: randomUUID(),
- envId: randomUUID(),
- folderId: randomUUID(),
- deletedEnvId: randomUUID(),
- deletedEnvFolderId: randomUUID(),
- name: `sm-a-${suffix}`
- },
- // A second live project so the counts prove aggregation rather than a single-project read
- smB: { projectId: randomUUID(), envId: randomUUID(), folderId: randomUUID(), name: `sm-b-${suffix}` },
- // Filtered out entirely
- otherProductType: { projectId: randomUUID(), envId: randomUUID(), folderId: randomUUID(), name: `pam-${suffix}` },
- deletedProject: { projectId: randomUUID(), envId: randomUUID(), folderId: randomUUID(), name: `del-${suffix}` },
- oldVersion: { projectId: randomUUID(), envId: randomUUID(), folderId: randomUUID(), name: `v1-${suffix}` },
- otherOrg: { projectId: randomUUID(), envId: randomUUID(), folderId: randomUUID(), name: `other-${suffix}` }
-};
-
-const projectList = Object.values(projects);
-
-const { permissionService, licenseService, setCanReadInsights, setPlanHasInsights } = buildOrgInsightsGateStubs();
-
-const insightsService = insightsServiceFactory({
- ...projectScopedInsightsDepStubs,
- permissionService,
- licenseService,
- orgDAL: { countAllOrgMembers: async () => 0 },
- identityOrgMembershipDAL: { countAllOrgIdentities: async () => 0 },
- dynamicSecretLeaseDAL: { countLeasesForOrg: async () => 0 },
- insightsDAL: insightsDALFactory(testDb),
- keyStore: passThroughKeyStore
-});
-
-const actor = (orgId: string): TOrgInsightsDTO => ({
- actor: ActorType.USER,
- actorId: USER_ID,
- actorAuthMethod: AuthMethod.EMAIL,
- actorOrgId: orgId,
- orgId
-});
-
-const secret = (folderId: string, overrides: Partial<TSecretsV2Insert> = {}): TSecretsV2Insert & { id: string } => ({
- id: randomUUID(),
- key: `SECRET_${randomUUID().slice(0, 8)}`,
- folderId,
- ...overrides
-});
-
-describe("insights org secrets counts", () => {
- beforeAll(async () => {
- const orgRows: (TOrganizationsInsert & { id: string })[] = [
- { id: ORG_ID, name: `counts-${suffix}`, slug: `counts-${suffix}` },
- { id: OTHER_ORG_ID, name: `counts-other-${suffix}`, slug: `counts-other-${suffix}` }
- ];
- await testDb(TableName.Organization).insert(orgRows);
-
- // Owner of the personal-override secret that must be excluded from the secrets count
- const userRows: (TUsersInsert & { id: string })[] = [
- { id: USER_ID, username: `counts-user-${suffix}`, isAccepted: true, isGhost: false }
- ];
- await testDb(TableName.Users).insert(userRows);
-
- const projectRows: (TProjectsInsert & { id: string })[] = projectList.map((p) => ({
- id: p.projectId,
- name: p.name,
- slug: p.name,
- orgId: p === projects.otherOrg ? OTHER_ORG_ID : ORG_ID,
- type: p === projects.otherProductType ? ProjectType.PAM : ProjectType.SecretManager,
- // The counts only cover v3 projects (the column defaults to v1)
- version: p === projects.oldVersion ? ProjectVersion.V1 : ProjectVersion.V3,
- ...(p === projects.deletedProject ? { deleteAfter: new Date() } : {})
- }));
- await testDb(TableName.Project).insert(projectRows);
-
- const environmentRows: (TProjectEnvironmentsInsert & { id: string })[] = [
- ...projectList.map((p, index) => ({
- id: p.envId,
- name: "Development",
- slug: "dev",
- position: index + 1,
- projectId: p.projectId
- })),
- {
- id: projects.smA.deletedEnvId,
- name: "Staging",
- slug: "staging",
- position: projectList.length + 1,
- projectId: projects.smA.projectId,
- deleteAfter: new Date()
- }
- ];
- await testDb(TableName.Environment).insert(environmentRows);
-
- const folderRows: (TSecretFoldersInsert & { id: string })[] = [
- ...projectList.map((p) => ({
- id: p.folderId,
- name: "root",
- envId: p.envId,
- parentId: null
- })),
- { id: projects.smA.deletedEnvFolderId, name: "root", envId: projects.smA.deletedEnvId, parentId: null }
- ];
- await testDb(TableName.SecretFolder).insert(folderRows);
-
- const secretRows: (TSecretsV2Insert & { id: string })[] = [
- // smA: two shared secrets count, the personal override does not
- secret(projects.smA.folderId),
- secret(projects.smA.folderId),
- secret(projects.smA.folderId, { userId: USER_ID, type: "personal" }),
- // smA: behind the soft-deleted environment, must not count
- secret(projects.smA.deletedEnvFolderId),
- // smB: one shared secret
- secret(projects.smB.folderId),
- // each excluded project carries a secret that must not count
- secret(projects.otherProductType.folderId),
- secret(projects.deletedProject.folderId),
- secret(projects.oldVersion.folderId),
- secret(projects.otherOrg.folderId)
- ];
- await testDb(TableName.SecretV2).insert(secretRows);
-
- const connectionRows: (TAppConnectionsInsert & { id: string })[] = [
- {
- id: CONNECTION_ID,
- name: `conn-${suffix}`,
- app: "postgres",
- method: "username-and-password",
- encryptedCredentials: Buffer.from("{}"),
- orgId: ORG_ID
- }
- ];
- await testDb(TableName.AppConnection).insert(connectionRows);
-
- const rotation = (folderId: string, rotationStatus: string): TSecretRotationsV2Insert & { id: string } => ({
- id: randomUUID(),
- name: `rot-${randomUUID().slice(0, 8)}`,
- type: "postgres-credentials",
- parameters: {},
- secretsMapping: {},
- encryptedGeneratedCredentials: Buffer.from("{}"),
- folderId,
- connectionId: CONNECTION_ID,
- rotationInterval: 30,
- rotateAtUtc: { hours: 0, minutes: 0 },
- rotationStatus,
- lastRotationAttemptedAt: new Date(),
- lastRotatedAt: new Date()
- });
- await testDb(TableName.SecretRotationV2).insert([
- // the count is status-independent, so one of each status in the live scope
- rotation(projects.smA.folderId, SecretRotationStatus.Success),
- rotation(projects.smB.folderId, SecretRotationStatus.Failed),
- // behind a soft-deleted environment / in an excluded project: must not count
- rotation(projects.smA.deletedEnvFolderId, SecretRotationStatus.Success),
- rotation(projects.otherProductType.folderId, SecretRotationStatus.Success)
- ]);
- });
-
- afterAll(async () => {
- const orgIds = [ORG_ID, OTHER_ORG_ID];
- const folderIds = [...projectList.map((p) => p.folderId), projects.smA.deletedEnvFolderId];
- await testDb(TableName.SecretRotationV2).where("connectionId", CONNECTION_ID).delete();
- await testDb(TableName.AppConnection).where("id", CONNECTION_ID).delete();
- await testDb(TableName.SecretV2).whereIn("folderId", folderIds).delete();
- await testDb(TableName.SecretFolder).whereIn("id", folderIds).delete();
- await testDb(TableName.Environment)
- .whereIn("id", [...projectList.map((p) => p.envId), projects.smA.deletedEnvId])
- .delete();
- await testDb(TableName.Project).whereIn("orgId", orgIds).delete();
- await testDb(TableName.Users).where("id", USER_ID).delete();
- await testDb(TableName.Organization).whereIn("id", orgIds).delete();
- });
-
- test("returns whole-org counts scoped to live v3 secret-manager projects", async () => {
- const counts = await insightsService.getOrgSecretsCounts(actor(ORG_ID));
-
- expect(counts).toEqual({
- // smA + smB: the PAM, soft-deleted, v1 and other-org projects are all excluded
- projects: 2,
- // smA's two live shared secrets + smB's one. The personal override, the secret behind the
- // soft-deleted environment and the secrets in excluded projects contribute nothing.
- secrets: 3,
- // smA's live environment + smB's: the soft-deleted environment and excluded projects' don't count
- environments: 2,
- // one per live project; status does not matter
- rotations: 2
- });
- });
-
- test("an organization with no projects reports zeroes", async () => {
- const counts = await insightsService.getOrgSecretsCounts(actor(randomUUID()));
- expect(counts).toEqual({ projects: 0, secrets: 0, environments: 0, rotations: 0 });
- });
-
- test("throws when the actor cannot read secrets management insights", async () => {
- setCanReadInsights(false);
- try {
- await expect(insightsService.getOrgSecretsCounts(actor(ORG_ID))).rejects.toBeInstanceOf(ForbiddenError);
- } finally {
- setCanReadInsights(true);
- }
- });
-
- test("throws when the plan does not include secret access insights", async () => {
- setPlanHasInsights(false);
- try {
- await expect(insightsService.getOrgSecretsCounts(actor(ORG_ID))).rejects.toThrow(/Upgrade your plan/);
- } finally {
- setPlanHasInsights(true);
- }
- });
-});
diff --git a/backend/src/ee/routes/v1/insights-router.ts b/backend/src/ee/routes/v1/insights-router.ts
index b44b9a9416..4f9d262290 100644
--- a/backend/src/ee/routes/v1/insights-router.ts
+++ b/backend/src/ee/routes/v1/insights-router.ts
@@ -17,7 +17,6 @@ import {
import {
OrgAuthMethodDistributionSchema,
OrgSecretsAccessVolumeSchema,
- OrgSecretsCountsSchema,
SecretsProjectsSchema,
SecretsSummarySchema,
StaticSecretsUsageSchema
@@ -86,8 +85,6 @@ const OrgAuditReportSchema = z.object({
});
export const registerInsightsRouter = async (server: FastifyZodProvider) => {
- // Org scoped insights don't have a :projectId, so they are gated on the org-level Secrets Management Insights subject.
-
server.route({
method: "GET",
url: "/secrets/summary",
@@ -281,46 +278,6 @@ export const registerInsightsRouter = async (server: FastifyZodProvider) => {
}
});
- server.route({
- method: "GET",
- url: "/secrets/counts",
- config: {
- rateLimit: readLimit
- },
- onRequest: verifyAuth([AuthMode.JWT]),
- schema: {
- operationId: "getSecretsCounts",
- description:
- "Get whole-organization counts of secret management resources: dynamic secrets, secrets, and secret rotations.",
- security: [{ bearerAuth: [] }],
- response: {
- 200: z.object({
- counts: OrgSecretsCountsSchema
- })
- }
- },
- handler: async (req) => {
- const counts = await server.services.insights.getOrgSecretsCounts({
- actor: req.permission.type,
- actorId: req.permission.id,
- actorAuthMethod: req.permission.authMethod,
- actorOrgId: req.permission.orgId,
- orgId: req.permission.orgId
- });
-
- await server.services.auditLog.createAuditLog({
- ...req.auditLogInfo,
- orgId: req.permission.orgId,
- event: {
- type: EventType.VIEW_INSIGHTS_SECRETS_MANAGEMENT_ORG_COUNTS,
- metadata: counts
- }
- });
-
- return { counts };
- }
- });
-
server.route({
method: "POST",
url: "/secrets/reports",
diff --git a/backend/src/ee/services/insights/insights-schemas.ts b/backend/src/ee/services/insights/insights-schemas.ts
index b66d313777..febf80914d 100644
--- a/backend/src/ee/services/insights/insights-schemas.ts
+++ b/backend/src/ee/services/insights/insights-schemas.ts
@@ -47,12 +47,6 @@ export const OrgAuthMethodDistributionSchema = z.object({
.describe(INSIGHTS.GET_SECRETS_AUTH_METHOD_DISTRIBUTION.methods)
});
-export const OrgSecretsCountsSchema = z.object({
- dynamicSecrets: z.number().int().describe(INSIGHTS.GET_SECRETS_COUNTS.dynamicSecrets),
- secrets: z.number().int().describe(INSIGHTS.GET_SECRETS_COUNTS.secrets),
- rotations: z.number().int().describe(INSIGHTS.GET_SECRETS_COUNTS.rotations)
-});
-
export const StaticSecretsUsageSchema = z.object({
weeks: z
.object({
diff --git a/backend/src/ee/services/insights/insights-service.ts b/backend/src/ee/services/insights/insights-service.ts
index b3dde7995f..688056f980 100644
--- a/backend/src/ee/services/insights/insights-service.ts
+++ b/backend/src/ee/services/insights/insights-service.ts
@@ -60,7 +60,6 @@ import {
TOrgAccessVolume,
TOrgAuthMethodDistribution,
TOrgInsightsDTO,
- TOrgSecretsCounts,
TSecretsProjectWarnings,
TSecretsUsageInsights,
TStaticSecretsUsage
@@ -689,18 +688,6 @@ export const insightsServiceFactory = ({
});
};
- const getOrgSecretsCounts = async (dto: TOrgInsightsDTO): Promise<TOrgSecretsCounts> => {
- await assertOrgInsightsRead(dto);
-
- const cacheKey = KeyStorePrefixes.InsightsCache(dto.orgId, "org-counts-v2");
- return withCache({
- keyStore,
- key: cacheKey,
- ttlSeconds: KeyStoreTtls.InsightsOrgCacheInSeconds,
- fetcher: () => insightsDAL.countOrgSecretsResources(dto.orgId)
- });
- };
-
// How many static secrets the org created in each of the last 12 UTC calendar weeks.
//
// Deleting a secret is a hard delete with no tombstone, so a week can only be counted from the
@@ -758,7 +745,6 @@ export const insightsServiceFactory = ({
getCounts,
getSecretsUsageInsights,
getSecretsProjects,
- getStaticSecretsUsage,
- getOrgSecretsCounts
+ getStaticSecretsUsage
};
};
diff --git a/backend/src/ee/services/insights/insights-types.ts b/backend/src/ee/services/insights/insights-types.ts
index 24c8e7120b..7af2b9d9a1 100644
--- a/backend/src/ee/services/insights/insights-types.ts
+++ b/backend/src/ee/services/insights/insights-types.ts
@@ -5,7 +5,6 @@ import { TOrgPermission } from "@app/lib/types";
import {
OrgAuthMethodDistributionSchema,
OrgSecretsAccessVolumeSchema,
- OrgSecretsCountsSchema,
SecretsProjectsSchema,
SecretsProjectWarningSchema,
SecretsSummarySchema,
@@ -60,7 +59,6 @@ export type TSecretsProjectWarnings = z.infer<typeof SecretsProjectsSchema>;
export type TOrgAccessVolume = z.infer<typeof OrgSecretsAccessVolumeSchema>;
export type TOrgAuthMethodDistribution = z.infer<typeof OrgAuthMethodDistributionSchema>;
export type TStaticSecretsUsage = z.infer<typeof StaticSecretsUsageSchema>;
-export type TOrgSecretsCounts = z.infer<typeof OrgSecretsCountsSchema>;
export type TAccessVolumeActor = {
name: string;
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index b5e785a5bb..8a8188ba4e 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -934,12 +934,6 @@ export const INSIGHTS = {
totalFetches:
"The total number of times a secret value was accessed by a machine identity across every project in the organization in the last seven days. Accesses by users are not counted, and neither are accesses whose authentication method could not be determined, which happens for accesses recorded before the method was captured in audit logs."
},
- GET_SECRETS_COUNTS: {
- dynamicSecrets: "The total number of dynamic secrets across every secret management project in the organization.",
- secrets:
- "The total number of shared static secrets across every secret management project in the organization. Personal secret overrides are not counted.",
- rotations: "The total number of secret rotations across every secret management project in the organization."
- },
GET_STATIC_SECRETS_USAGE: {
weeks:
"One entry for each of the last twelve weeks, oldest first. Weeks in which no secret was created are included with a count of zero.",
diff --git a/frontend/src/hooks/api/secretInsights/index.ts b/frontend/src/hooks/api/secretInsights/index.ts
index 85c1251752..507f35c9e5 100644
--- a/frontend/src/hooks/api/secretInsights/index.ts
+++ b/frontend/src/hooks/api/secretInsights/index.ts
@@ -5,7 +5,6 @@ export {
useGetInsightsSummary,
useGetOrgAuthMethodDistribution,
useGetOrgSecretsAccessVolume,
- useGetOrgSecretsCounts,
useGetOrgSecretsProjects,
useGetOrgSecretsSummary,
useGetOrgStaticSecretsUsage,
@@ -37,7 +36,6 @@ export type {
TOrgProjectInsightWarnings,
TOrgProjectsInsights,
TOrgSecretAccessVolume,
- TOrgSecretsCounts,
TOrgSecretsSummary,
TOrgStaticSecretUsage,
TSecretAccessVolumeActor,
diff --git a/frontend/src/hooks/api/secretInsights/queries.tsx b/frontend/src/hooks/api/secretInsights/queries.tsx
index 35e3e1094a..98d99544ef 100644
--- a/frontend/src/hooks/api/secretInsights/queries.tsx
+++ b/frontend/src/hooks/api/secretInsights/queries.tsx
@@ -23,7 +23,6 @@ import {
TOrgAuthMethodUsage,
TOrgProjectsInsights,
TOrgSecretAccessVolume,
- TOrgSecretsCounts,
TOrgSecretsSummary,
TOrgStaticSecretUsage
} from "./types";
@@ -57,9 +56,7 @@ export const secretInsightsKeys = {
orgStaticSecretsUsage: (orgId: string) =>
[...secretInsightsKeys.all(), "org-static-secrets-usage", { orgId }] as const,
orgAccessVolume: (orgId: string) =>
- [...secretInsightsKeys.all(), "org-access-volume", { orgId }] as const,
- orgSecretsCounts: (orgId: string) =>
- [...secretInsightsKeys.all(), "org-secrets-counts", { orgId }] as const
+ [...secretInsightsKeys.all(), "org-access-volume", { orgId }] as const
};
const INSIGHTS_STALE_TIME = 5 * 60 * 1000; // 5 minutes
@@ -325,17 +322,3 @@ export const useGetOrgSecretsAccessVolume = (orgId: string, options?: { enabled?
staleTime: INSIGHTS_STALE_TIME
});
};
-
-export const useGetOrgSecretsCounts = (orgId: string) => {
- return useQuery({
- queryKey: secretInsightsKeys.orgSecretsCounts(orgId),
- queryFn: async () => {
- const { data } = await apiRequest.get<{ counts: TOrgSecretsCounts }>(
- "/api/v1/insights/secrets/counts"
- );
- return data.counts;
- },
- enabled: Boolean(orgId),
- staleTime: INSIGHTS_STALE_TIME
- });
-};
diff --git a/frontend/src/hooks/api/secretInsights/types.ts b/frontend/src/hooks/api/secretInsights/types.ts
index 3c2081177a..dda7a01097 100644
--- a/frontend/src/hooks/api/secretInsights/types.ts
+++ b/frontend/src/hooks/api/secretInsights/types.ts
@@ -220,9 +220,3 @@ export type TOrgStaticSecretUsage = {
export type TOrgSecretAccessVolume = {
days: { date: string; total: number }[];
};
-
-export type TOrgSecretsCounts = {
- dynamicSecrets: number;
- secrets: number;
- rotations: number;
-};
diff --git a/frontend/src/pages/organization/SecretInsightsPage/SecretInsightsPage.tsx b/frontend/src/pages/organization/SecretInsightsPage/SecretInsightsPage.tsx
index 6fb33ee4c9..f685f8a084 100644
--- a/frontend/src/pages/organization/SecretInsightsPage/SecretInsightsPage.tsx
+++ b/frontend/src/pages/organization/SecretInsightsPage/SecretInsightsPage.tsx
@@ -1,7 +1,7 @@
-import { Fragment, ReactNode, useMemo } from "react";
+import { useMemo } from "react";
import { Helmet } from "react-helmet";
import { format } from "date-fns";
-import { BoxIcon, FileTextIcon, KeyIcon, RefreshCwIcon } from "lucide-react";
+import { FileTextIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
import { PageHeader } from "@app/components/v2";
@@ -22,7 +22,6 @@ import {
useGetOrgAuditReports,
useGetOrgAuthMethodDistribution,
useGetOrgSecretsAccessVolume,
- useGetOrgSecretsCounts,
useGetOrgSecretsProjects,
useGetOrgSecretsSummary,
useGetOrgStaticSecretsUsage
@@ -85,8 +84,6 @@ export const SecretInsightsPage = withPermission(
{ enabled: isClickhouseEnabled }
);
- const { data: counts } = useGetOrgSecretsCounts(currentOrg.id);
-
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["requestOrgReport"] as const);
// Reports are generated asynchronously and delivered by email; the list is newest-first
// and polls while a report is in flight (the backend allows one in-flight report per org).
@@ -102,44 +99,6 @@ export const SecretInsightsPage = withPermission(
const isAccessVolumeLoading = isClickhouseEnabled && isAccessVolumePending;
const showAuthMethodsSlot = isAuthMethodsLoading || Boolean(authMethodUsage);
- const headerStats: { label: string; value: number; icon: ReactNode }[] = counts
- ? [
- {
- label: "total dynamic secrets",
- value: counts.dynamicSecrets,
- icon: <BoxIcon className="size-3.5 text-accent" />
- },
- {
- label: "secrets",
- value: counts.secrets,
- icon: <KeyIcon className="size-3.5 text-accent" />
- },
- {
- label: "secret rotations",
- value: counts.rotations,
- icon: <RefreshCwIcon className="size-3.5 text-secret-rotation" />
- }
- ]
- : [];
-
- const renderStatStrip = (className: string, withTrailingSeparator = false) => (
- <div className={`flex-wrap items-center gap-x-2 gap-y-1 text-xs text-accent ${className}`}>
- {headerStats.map((stat, idx) => (
- <Fragment key={stat.label}>
- {idx > 0 && <span className="text-border">|</span>}
- <span className="flex items-center gap-1 whitespace-nowrap">
- {stat.icon}
- <span className="ml-1">
- <span className="text-foreground/75">{stat.value.toLocaleString()}</span>{" "}
- {stat.label}
- </span>
- </span>
- </Fragment>
- ))}
- {withTrailingSeparator && headerStats.length > 0 && <span className="text-border">|</span>}
- </div>
- );
-
return (
<>
<Helmet>
@@ -154,7 +113,6 @@ export const SecretInsightsPage = withPermission(
title="Insights"
description="Organization-wide visibility into secret health, access patterns, and authentication hygiene."
>
- {renderStatStrip("hidden justify-end dashboard:flex", true)}
<div className="flex items-center gap-3">
{lastSentReport && (
<span className="flex items-center gap-1.5 text-xs whitespace-nowrap text-mineshaft-300">
@@ -194,7 +152,6 @@ export const SecretInsightsPage = withPermission(
</OrgPermissionCan>
</div>
</PageHeader>
- {renderStatStrip("mb-6 flex justify-start dashboard:hidden")}
<div className="flex flex-col gap-4 pb-8">
{isSummaryPending && (
<div className="grid gap-4 md:grid-cols-3">
diff --git a/frontend/src/pages/organization/SecretInsightsPage/components/InsightsCard.tsx b/frontend/src/pages/organization/SecretInsightsPage/components/InsightsCard.tsx
index 875b0c7385..05ac19d102 100644
--- a/frontend/src/pages/organization/SecretInsightsPage/components/InsightsCard.tsx
+++ b/frontend/src/pages/organization/SecretInsightsPage/components/InsightsCard.tsx
@@ -50,10 +50,10 @@ const WARNING_CHIPS: {
variant: TBadgeProps["variant"];
label: (count: number) => string;
}[] = [
- { key: "failedRotations", variant: "danger", label: (c) => pluralize(c, "failed rotation") },
- { key: "failedSyncs", variant: "warning", label: (c) => pluralize(c, "failed sync") },
- { key: "orphanedLeases", variant: "warning", label: (c) => pluralize(c, "orphaned lease") },
- { key: "duplicatedSecrets", variant: "neutral", label: (c) => `${c.toLocaleString()} duplicated` }
+ { key: "failedRotations", variant: "danger", label: (c) => pluralize(c, "Failed rotation") },
+ { key: "failedSyncs", variant: "warning", label: (c) => pluralize(c, "Failed sync") },
+ { key: "orphanedLeases", variant: "danger", label: (c) => pluralize(c, "Orphaned lease") },
+ { key: "duplicatedSecrets", variant: "neutral", label: (c) => `${c.toLocaleString()} Duplicated` }
];
const WarningBadges = ({ warnings }: { warnings: TOrgProjectInsightWarnings }) => (