mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
improvements: address greppy
This commit is contained in:
@@ -242,7 +242,7 @@ export const registerSecretScanningV2Router = async (server: FastifyZodProvider)
|
||||
tags: [ApiDocsTags.SecretScanning],
|
||||
description: "Update the specified Secret Scanning Configuration.",
|
||||
querystring: z.object({
|
||||
projectId: z.string().trim().min(1, "Finding ID required").describe(SecretScanningConfigs.UPDATE.projectId)
|
||||
projectId: z.string().trim().min(1, "Project ID required").describe(SecretScanningConfigs.UPDATE.projectId)
|
||||
}),
|
||||
body: z.object({
|
||||
content: z.string().nullable().describe(SecretScanningConfigs.UPDATE.content)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { join } from "path";
|
||||
import { ProbotOctokit } from "probot";
|
||||
import RE2 from "re2";
|
||||
|
||||
import { scanContentAndGetFindings } from "@app/ee/services/secret-scanning/secret-scanning-queue/secret-scanning-fns";
|
||||
import { SecretMatch } from "@app/ee/services/secret-scanning/secret-scanning-queue/secret-scanning-queue-types";
|
||||
@@ -25,12 +24,11 @@ import {
|
||||
import { getConfig } from "@app/lib/config/env";
|
||||
import { BadRequestError } from "@app/lib/errors";
|
||||
import { titleCaseToCamelCase } from "@app/lib/fn";
|
||||
import { GitHubRepositoryRegex } from "@app/lib/regex";
|
||||
import { listGitHubRadarRepositories, TGitHubRadarConnection } from "@app/services/app-connection/github-radar";
|
||||
|
||||
import { TGitHubDataSourceWithConnection, TQueueGitHubResourceDiffScan } from "./github-secret-scanning-types";
|
||||
|
||||
const GitHubRepositoryRegex = new RE2(/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/);
|
||||
|
||||
export const GitHubSecretScanningFactory = () => {
|
||||
const initialize: TSecretScanningFactoryInitialize<TGitHubRadarConnection> = async (
|
||||
{ connection, secretScanningV2DAL },
|
||||
|
||||
@@ -12,11 +12,12 @@ import {
|
||||
GitRepositoryScanFindingDetailsSchema
|
||||
} from "@app/ee/services/secret-scanning-v2/secret-scanning-v2-schemas";
|
||||
import { SecretScanningDataSources } from "@app/lib/api-docs";
|
||||
import { GitHubRepositoryRegex } from "@app/lib/regex";
|
||||
import { AppConnection } from "@app/services/app-connection/app-connection-enums";
|
||||
|
||||
export const GitHubDataSourceConfigSchema = z.object({
|
||||
includeRepos: z
|
||||
.array(z.string().min(1).max(256))
|
||||
.array(z.string().regex(GitHubRepositoryRegex, "Invalid repository name format").min(1).max(256))
|
||||
.nonempty("One or more repositories required")
|
||||
.max(25)
|
||||
.default(["*"])
|
||||
|
||||
@@ -827,6 +827,7 @@ export const secretScanningV2ServiceFactory = ({
|
||||
const configPath = join(tempFolder, "infisical-scan.toml");
|
||||
await writeTextToFile(configPath, content);
|
||||
|
||||
// just checking if config parses
|
||||
await scanContentAndGetFindings("", configPath);
|
||||
} catch (e) {
|
||||
throw new BadRequestError({
|
||||
|
||||
@@ -9,3 +9,5 @@ export const DistinguishedNameRegex =
|
||||
export const UserPrincipalNameRegex = new RE2(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]{2,}$/);
|
||||
|
||||
export const LdapUrlRegex = new RE2(/^ldaps?:\/\//);
|
||||
|
||||
export const GitHubRepositoryRegex = new RE2(/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/);
|
||||
|
||||
@@ -195,7 +195,6 @@ export const validateAppConnectionCredentials = async (
|
||||
export const getAppConnectionMethodName = (method: TAppConnection["method"]) => {
|
||||
switch (method) {
|
||||
case GitHubConnectionMethod.App:
|
||||
return "GitHub App";
|
||||
case GitHubRadarConnectionMethod.App:
|
||||
return "GitHub App";
|
||||
case AzureKeyVaultConnectionMethod.OAuth:
|
||||
|
||||
@@ -31,7 +31,7 @@ description: "Learn how to configure secret scanning for GitHub."
|
||||

|
||||
|
||||
- **Name** - the name of the data source. Must be slug-friendly.
|
||||
- **Description** (optional) - a description of this rotation configuration.
|
||||
- **Description** (optional) - a description of this data source.
|
||||
|
||||
5. Review your data source, then click **Create Data Source**.
|
||||

|
||||
@@ -60,9 +60,8 @@ description: "Learn how to configure secret scanning for GitHub."
|
||||
"description": "my github data source",
|
||||
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"isAutoScanEnabled": true,
|
||||
"rotationInterval": 30,
|
||||
"config": {
|
||||
"includeRepos": ["*"],
|
||||
"includeRepos": ["*"]
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ export const DeleteProjectTemplateModal = ({ isOpen, onOpenChange, template }: P
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
onChange={onOpenChange}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleDeleteProjectTemplate}
|
||||
/>
|
||||
|
||||
@@ -112,7 +112,7 @@ export const EditProjectTemplate = ({ isInfisicalTemplate, projectTemplate, onBa
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeTemplate.isOpen}
|
||||
title={`Are you sure want to delete ${projectTemplate.name}?`}
|
||||
title={`Are you sure you want to delete ${projectTemplate.name}?`}
|
||||
deleteKey="confirm"
|
||||
onChange={(isOpen) => handlePopUpToggle("removeTemplate", isOpen)}
|
||||
onDeleteApproved={handleRemoveTemplate}
|
||||
|
||||
@@ -66,7 +66,7 @@ export const DeleteSecretRotationV2Modal = ({
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
onChange={onOpenChange}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
deleteKey={name}
|
||||
onDeleteApproved={handleDeleteSecretRotation}
|
||||
>
|
||||
|
||||
@@ -19,7 +19,7 @@ export const DeleteSecretScanningDataSourceModal = ({
|
||||
dataSource,
|
||||
onComplete
|
||||
}: Props) => {
|
||||
const deleteSecretRotation = useDeleteSecretScanningDataSource();
|
||||
const deleteDataSource = useDeleteSecretScanningDataSource();
|
||||
|
||||
if (!dataSource) return null;
|
||||
|
||||
@@ -29,7 +29,7 @@ export const DeleteSecretScanningDataSourceModal = ({
|
||||
const dataSourceType = SECRET_SCANNING_DATA_SOURCE_MAP[type].name;
|
||||
|
||||
try {
|
||||
await deleteSecretRotation.mutateAsync({
|
||||
await deleteDataSource.mutateAsync({
|
||||
dataSourceId,
|
||||
type,
|
||||
projectId
|
||||
@@ -54,7 +54,7 @@ export const DeleteSecretScanningDataSourceModal = ({
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
onChange={onOpenChange}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
deleteKey={name}
|
||||
onDeleteApproved={handleDeleteDataSource}
|
||||
>
|
||||
|
||||
@@ -43,7 +43,7 @@ export const GitHubDataSourceConfigFields = () => {
|
||||
if (!includeRepos) {
|
||||
setValue("config.includeRepos", ["*"]);
|
||||
}
|
||||
}, [includeRepos]);
|
||||
}, [includeRepos, setValue]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -36,8 +36,6 @@ export const SecretScanningDataSourceConnectionField = ({
|
||||
OrgPermissionSubjects.AppConnections
|
||||
);
|
||||
|
||||
const appName = APP_CONNECTION_MAP[app].name;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Controller
|
||||
@@ -89,14 +87,14 @@ export const SecretScanningDataSourceConnectionField = ({
|
||||
<FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />
|
||||
{canCreateConnection ? (
|
||||
<>
|
||||
You do not have access to any {appName} Connections. Create one from the{" "}
|
||||
You do not have access to any {connectionName} Connections. Create one from the{" "}
|
||||
<Link to="/organization/app-connections" className="underline">
|
||||
App Connections
|
||||
</Link>{" "}
|
||||
page.
|
||||
</>
|
||||
) : (
|
||||
`You do not have access to any ${appName} Connections. Contact an admin to create one.`
|
||||
`You do not have access to any ${connectionName} Connections. Contact an admin to create one.`
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -66,13 +66,13 @@ export const SecretScanningDataSourceForm = ({ type, onComplete, onCancel, dataS
|
||||
projectId: currentWorkspace.id
|
||||
});
|
||||
try {
|
||||
const rotation = await mutation;
|
||||
const source = await mutation;
|
||||
|
||||
createNotification({
|
||||
text: `Successfully ${dataSource ? "updated" : "created"} ${sourceType} Data Source`,
|
||||
text: `Successfully ${source ? "updated" : "created"} ${sourceType} Data Source`,
|
||||
type: "success"
|
||||
});
|
||||
onComplete(rotation);
|
||||
onComplete(source);
|
||||
} catch (err: any) {
|
||||
createNotification({
|
||||
title: `Failed to ${dataSource ? "update" : "create"} ${sourceType} Data Source`,
|
||||
|
||||
@@ -8,7 +8,11 @@ export const GitHubDataSourceSchema = z
|
||||
.object({
|
||||
type: z.literal(SecretScanningDataSource.GitHub),
|
||||
config: z.object({
|
||||
includeRepos: z.string().array().min(1, "One or more repositories required")
|
||||
includeRepos: z
|
||||
.string()
|
||||
.array()
|
||||
.min(1, "One or more repositories required")
|
||||
.max(25, "Cannot configure more than 25 repositories")
|
||||
})
|
||||
})
|
||||
.merge(BaseSecretScanningDataSourceSchema({ isConnectionRequired: true }));
|
||||
|
||||
@@ -52,7 +52,7 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
onChange={onOpenChange}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
deleteKey={name}
|
||||
onDeleteApproved={handleDeleteSecretSync}
|
||||
>
|
||||
|
||||
@@ -80,7 +80,6 @@ export const APP_CONNECTION_MAP: Record<
|
||||
export const getAppConnectionMethodDetails = (method: TAppConnection["method"]) => {
|
||||
switch (method) {
|
||||
case GitHubConnectionMethod.App:
|
||||
return { name: "GitHub App", icon: faGithub };
|
||||
case GitHubRadarConnectionMethod.App:
|
||||
return { name: "GitHub App", icon: faGithub };
|
||||
case AzureKeyVaultConnectionMethod.OAuth:
|
||||
|
||||
@@ -8,11 +8,11 @@ export type TSecretScanningDataSourceBase = {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
projectId: string;
|
||||
connection: {
|
||||
connection?: {
|
||||
app: AppConnection;
|
||||
id: string;
|
||||
name: string;
|
||||
};
|
||||
} | null;
|
||||
isAutoScanEnabled: boolean;
|
||||
isDisconnected: boolean;
|
||||
};
|
||||
|
||||
@@ -164,7 +164,7 @@ export const MachineIdentitiesTable = () => {
|
||||
<IdentityPanelTable handlePopUpOpen={handlePopUpOpen} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeServerAdmin.isOpen}
|
||||
title={`Are you sure want to remove Server Admin permissions from ${
|
||||
title={`Are you sure you want to remove Server Admin permissions from ${
|
||||
(popUp?.removeServerAdmin?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
subTitle=""
|
||||
|
||||
@@ -309,7 +309,7 @@ export const UserIdentitiesTable = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.upgradeToServerAdmin.isOpen}
|
||||
title={`Are you sure want to grant Server Admin permissions to ${
|
||||
title={`Are you sure you want to grant Server Admin permissions to ${
|
||||
(popUp?.upgradeToServerAdmin?.data as { id: string; username: string })?.username || ""
|
||||
}?`}
|
||||
subTitle=""
|
||||
@@ -320,7 +320,7 @@ export const UserIdentitiesTable = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeServerAdmin.isOpen}
|
||||
title={`Are you sure want to remove Server Admin permissions from ${
|
||||
title={`Are you sure you want to remove Server Admin permissions from ${
|
||||
(popUp?.removeServerAdmin?.data as { id: string; username: string })?.username || ""
|
||||
}?`}
|
||||
subTitle=""
|
||||
|
||||
@@ -70,7 +70,7 @@ export const PkiAlertsSection = () => {
|
||||
<PkiAlertModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deletePkiAlert.isOpen}
|
||||
title={`Are you sure want to remove the alert ${
|
||||
title={`Are you sure you want to remove the alert ${
|
||||
(popUp?.deletePkiAlert?.data as { name: string })?.name || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deletePkiAlert", isOpen)}
|
||||
|
||||
@@ -70,7 +70,7 @@ export const PkiCollectionSection = () => {
|
||||
<PkiCollectionModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deletePkiCollection.isOpen}
|
||||
title={`Are you sure want to remove the alert ${
|
||||
title={`Are you sure you want to remove the alert ${
|
||||
(popUp?.deletePkiCollection?.data as { name: string })?.name || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deletePkiCollection", isOpen)}
|
||||
|
||||
@@ -135,7 +135,7 @@ const Page = () => {
|
||||
<CaInstallCertModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteCa.isOpen}
|
||||
title={`Are you sure want to remove the CA ${
|
||||
title={`Are you sure you want to remove the CA ${
|
||||
(popUp?.deleteCa?.data as { dn: string })?.dn || ""
|
||||
} from the project?`}
|
||||
subTitle="This action will delete other CAs and certificates below it in your CA hierarchy."
|
||||
|
||||
@@ -96,7 +96,7 @@ export const CaSection = () => {
|
||||
<CaTable handlePopUpOpen={handlePopUpOpen} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteCa.isOpen}
|
||||
title={`Are you sure want to remove the CA ${
|
||||
title={`Are you sure you want to remove the CA ${
|
||||
(popUp?.deleteCa?.data as { dn: string })?.dn || ""
|
||||
} from the project?`}
|
||||
subTitle="This action will delete other CAs and certificates below it in your CA hierarchy."
|
||||
@@ -108,7 +108,7 @@ export const CaSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.caStatus.isOpen}
|
||||
title={`Are you sure want to ${
|
||||
title={`Are you sure you want to ${
|
||||
(popUp?.caStatus?.data as { status: string })?.status === CaStatus.ACTIVE
|
||||
? "enable"
|
||||
: "disable"
|
||||
|
||||
@@ -97,7 +97,7 @@ export const ExternalCaSection = () => {
|
||||
<ExternalCaTable handlePopUpOpen={handlePopUpOpen} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteCa.isOpen}
|
||||
title={`Are you sure want to remove the CA ${
|
||||
title={`Are you sure you want to remove the CA ${
|
||||
(popUp?.deleteCa?.data as { dn: string })?.dn || ""
|
||||
} from the project?`}
|
||||
subTitle="This action will delete other CAs and certificates below it in your CA hierarchy."
|
||||
@@ -112,7 +112,7 @@ export const ExternalCaSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.caStatus.isOpen}
|
||||
title={`Are you sure want to ${
|
||||
title={`Are you sure you want to ${
|
||||
(popUp?.caStatus?.data as { status: string })?.status === CaStatus.ACTIVE
|
||||
? "enable"
|
||||
: "disable"
|
||||
|
||||
@@ -90,7 +90,7 @@ export const CertificateTemplatesSection = ({ caId }: Props) => {
|
||||
<CertificateTemplateEnrollmentModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteCertificateTemplate.isOpen}
|
||||
title={`Are you sure want to delete the certificate template ${
|
||||
title={`Are you sure you want to delete the certificate template ${
|
||||
(popUp?.deleteCertificateTemplate?.data as { name: string })?.name || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteCertificateTemplate", isOpen)}
|
||||
|
||||
@@ -89,7 +89,7 @@ export const CertificatesSection = () => {
|
||||
<CertificateRevocationModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteCertificate.isOpen}
|
||||
title={`Are you sure want to remove the certificate ${
|
||||
title={`Are you sure you want to remove the certificate ${
|
||||
(popUp?.deleteCertificate?.data as { commonName: string })?.commonName || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteCertificate", isOpen)}
|
||||
|
||||
@@ -152,7 +152,7 @@ export const PkiCollectionPage = () => {
|
||||
<PkiCollectionModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deletePkiCollection.isOpen}
|
||||
title={`Are you sure want to delete the PKI collection ${data?.name ?? ""}?`}
|
||||
title={`Are you sure you want to delete the PKI collection ${data?.name ?? ""}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deletePkiCollection", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
|
||||
@@ -74,7 +74,7 @@ export const PkiCollectionItemsSection = ({ collectionId, type }: Props) => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deletePkiCollectionItem.isOpen}
|
||||
title={`Are you sure want to remove the item from the collection ${pkiCollection.name}?`}
|
||||
title={`Are you sure you want to remove the item from the collection ${pkiCollection.name}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deletePkiCollectionItem", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() => {
|
||||
|
||||
@@ -79,14 +79,6 @@ export const DeleteProjectSection = () => {
|
||||
};
|
||||
|
||||
const handleLeaveWorkspaceSubmit = async () => {
|
||||
console.log({
|
||||
currentWorkspace,
|
||||
currentOrg,
|
||||
members,
|
||||
isNoAccessMember,
|
||||
membership
|
||||
});
|
||||
|
||||
try {
|
||||
setIsLeaving.on();
|
||||
|
||||
@@ -170,7 +162,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteWorkspace.isOpen}
|
||||
title="Are you sure want to delete this project?"
|
||||
title="Are you sure you want to delete this project?"
|
||||
subTitle={`Permanently delete ${currentWorkspace?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
@@ -180,8 +172,8 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<LeaveProjectModal
|
||||
isOpen={popUp.leaveWorkspace.isOpen}
|
||||
title="Are you sure want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and it's contents.`}
|
||||
title="Are you sure you want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and its contents.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Leave Project"
|
||||
|
||||
@@ -44,7 +44,7 @@ export const DeleteKmipClientModal = ({ isOpen, onOpenChange, kmipClient }: Prop
|
||||
return (
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
onChange={onOpenChange}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleDeleteKmipClient}
|
||||
|
||||
@@ -43,7 +43,7 @@ export const DeleteCmekModal = ({ isOpen, onOpenChange, cmek }: Props) => {
|
||||
return (
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
onChange={onOpenChange}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleDeleteCmek}
|
||||
|
||||
@@ -79,14 +79,6 @@ export const DeleteProjectSection = () => {
|
||||
};
|
||||
|
||||
const handleLeaveWorkspaceSubmit = async () => {
|
||||
console.log({
|
||||
currentWorkspace,
|
||||
currentOrg,
|
||||
members,
|
||||
isNoAccessMember,
|
||||
membership
|
||||
});
|
||||
|
||||
try {
|
||||
setIsLeaving.on();
|
||||
|
||||
@@ -170,7 +162,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteWorkspace.isOpen}
|
||||
title="Are you sure want to delete this project?"
|
||||
title="Are you sure you want to delete this project?"
|
||||
subTitle={`Permanently delete ${currentWorkspace?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
@@ -180,8 +172,8 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<LeaveProjectModal
|
||||
isOpen={popUp.leaveWorkspace.isOpen}
|
||||
title="Are you sure want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and it's contents.`}
|
||||
title="Are you sure you want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and its contents.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Leave Project"
|
||||
|
||||
@@ -80,7 +80,7 @@ export const OrgGroupsSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteGroup.isOpen}
|
||||
title={`Are you sure want to delete the group named ${
|
||||
title={`Are you sure you want to delete the group named ${
|
||||
(popUp?.deleteGroup?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteGroup", isOpen)}
|
||||
|
||||
@@ -127,7 +127,7 @@ export const IdentitySection = withPermission(
|
||||
<IdentityTokenAuthTokenModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteIdentity.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteIdentity?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
|
||||
|
||||
@@ -143,7 +143,7 @@ export const OrgMembersSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeMember.isOpen}
|
||||
title={`Are you sure want to remove member with username ${
|
||||
title={`Are you sure you want to remove member with username ${
|
||||
(popUp?.removeMember?.data as { username: string })?.username || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeMember", isOpen)}
|
||||
@@ -156,7 +156,7 @@ export const OrgMembersSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deactivateMember.isOpen}
|
||||
title={`Are you sure want to deactivate member with username ${
|
||||
title={`Are you sure you want to deactivate member with username ${
|
||||
(popUp?.deactivateMember?.data as { username: string })?.username || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deactivateMember", isOpen)}
|
||||
|
||||
@@ -280,7 +280,7 @@ export const OrgRoleTable = () => {
|
||||
<RoleModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteRole.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteRole?.data as TOrgRole)?.name || " "
|
||||
} role?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteRole", isOpen)}
|
||||
|
||||
@@ -54,7 +54,7 @@ export const AppConnectionsSelect = ({ onSelect }: Props) => {
|
||||
/>
|
||||
{icon && (
|
||||
<FontAwesomeIcon
|
||||
className="-right- absolute -bottom-1.5 -right-1.5 text-primary-700"
|
||||
className="absolute -bottom-1.5 -right-1.5 text-primary-700"
|
||||
size="xl"
|
||||
icon={icon}
|
||||
/>
|
||||
|
||||
@@ -44,7 +44,7 @@ export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }
|
||||
<DeleteActionModal
|
||||
isOpen={isOpen}
|
||||
onChange={onOpenChange}
|
||||
title={`Are you sure want to delete ${name}?`}
|
||||
title={`Are you sure you want to delete ${name}?`}
|
||||
deleteKey={name}
|
||||
onDeleteApproved={handleDeleteAppConnection}
|
||||
>
|
||||
|
||||
@@ -229,7 +229,7 @@ export const GatewayListPage = withPermission(
|
||||
)}
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteGateway.isOpen}
|
||||
title={`Are you sure want to delete gateway ${
|
||||
title={`Are you sure you want to delete gateway ${
|
||||
(popUp?.deleteGateway?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteGateway", isOpen)}
|
||||
|
||||
@@ -157,7 +157,7 @@ const Page = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteGroup.isOpen}
|
||||
title={`Are you sure want to delete the group named ${
|
||||
title={`Are you sure you want to delete the group named ${
|
||||
(popUp?.deleteGroup?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteGroup", isOpen)}
|
||||
|
||||
@@ -94,7 +94,7 @@ export const GroupMembersSection = ({ groupId, groupSlug }: Props) => {
|
||||
<AddGroupMembersModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeMemberFromGroup.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.removeMemberFromGroup?.data as { username: string })?.username || ""
|
||||
} from the group?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeMemberFromGroup", isOpen)}
|
||||
|
||||
@@ -101,7 +101,7 @@ const Page = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteIdentity.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteIdentity?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
|
||||
|
||||
@@ -66,7 +66,7 @@ export const IdentityProjectsSection = ({ identityId }: Props) => {
|
||||
</div>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeIdentityFromProject.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.removeIdentityFromProject?.data as { identityName: string })?.identityName || ""
|
||||
} from ${
|
||||
(popUp?.removeIdentityFromProject?.data as { projectName: string })?.projectName || ""
|
||||
|
||||
@@ -218,7 +218,7 @@ export const IdentityTokenAuthTokensTable = ({ tokens, identityId }: Props) => {
|
||||
</TableContainer>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.revokeToken.isOpen}
|
||||
title={`Are you sure want to revoke ${
|
||||
title={`Are you sure you want to revoke ${
|
||||
(popUp?.revokeToken?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("revokeToken", isOpen)}
|
||||
|
||||
@@ -175,7 +175,7 @@ export const IdentityUniversalAuthClientSecretsTable = ({ clientSecrets, identit
|
||||
</TableContainer>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.revokeClientSecret.isOpen}
|
||||
title={`Are you sure want to delete the client secret ${
|
||||
title={`Are you sure you want to delete the client secret ${
|
||||
(popUp?.revokeClientSecret?.data as { clientSecretPrefix: string })?.clientSecretPrefix ||
|
||||
""
|
||||
}************?`}
|
||||
|
||||
@@ -151,7 +151,7 @@ export const Content = ({
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp?.revokeAuthMethod?.isOpen}
|
||||
title={`Are you sure want to remove ${identityAuthToNameMap[authMethod]} on this identity?`}
|
||||
title={`Are you sure you want to remove ${identityAuthToNameMap[authMethod]} on this identity?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("revokeAuthMethod", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Remove"
|
||||
|
||||
@@ -155,7 +155,7 @@ export const Page = () => {
|
||||
<RoleModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteOrgRole.isOpen}
|
||||
title={`Are you sure want to delete the organization role ${data?.name ?? ""}?`}
|
||||
title={`Are you sure you want to delete the organization role ${data?.name ?? ""}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteOrgRole", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() => onDeleteOrgRoleSubmit()}
|
||||
|
||||
@@ -16,7 +16,7 @@ export const Route = createFileRoute(
|
||||
},
|
||||
{
|
||||
label: "Secret Scanning",
|
||||
link: linkOptions({ to: "/organization/secret-scanning/settings" })
|
||||
link: linkOptions({ to: "/organization/secret-scanning/overview" })
|
||||
},
|
||||
{
|
||||
label: "Settings"
|
||||
|
||||
@@ -59,7 +59,7 @@ export const OrgDeleteSection = () => {
|
||||
</div>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteOrg.isOpen}
|
||||
title="Are you sure want to delete this organization?"
|
||||
title="Are you sure you want to delete this organization?"
|
||||
subTitle={`Permanently remove ${currentOrg?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteOrg", isOpen)}
|
||||
deleteKey="confirm"
|
||||
|
||||
@@ -136,7 +136,7 @@ export const OrgEncryptionTab = withPermission(
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeExternalKms.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.removeExternalKms?.data as { slug: string })?.slug || ""
|
||||
} from ${(popUp?.removeExternalKms?.data as { provider: string })?.provider || ""}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeExternalKms", isOpen)}
|
||||
|
||||
@@ -305,7 +305,7 @@ export const OrgWorkflowIntegrationTab = withPermission(
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeIntegration.isOpen}
|
||||
title={`Are you sure want to remove ${popUp?.removeIntegration?.data?.slug}?`}
|
||||
title={`Are you sure you want to remove ${popUp?.removeIntegration?.data?.slug}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeIntegration", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleRemoveIntegration}
|
||||
|
||||
@@ -162,7 +162,7 @@ export const GithubOrgSyncConfigModal = ({
|
||||
</form>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteGithubOrgSyncConfig.isOpen}
|
||||
title="Are you sure want to remove GitHub organization sync?"
|
||||
title="Are you sure you want to remove GitHub organization sync?"
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteGithubOrgSyncConfig", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={onDelete}
|
||||
|
||||
@@ -301,7 +301,7 @@ export const ScimTokenModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }: Pr
|
||||
</TableContainer>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteScimToken.isOpen}
|
||||
title="Are you sure want to delete the SCIM token?"
|
||||
title="Are you sure you want to delete the SCIM token?"
|
||||
onChange={(isOpen) => handlePopUpToggle("scimToken", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() => {
|
||||
|
||||
@@ -249,7 +249,7 @@ export const LDAPGroupMapModal = ({ popUp, handlePopUpOpen, handlePopUpToggle }:
|
||||
</TableContainer>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteLdapGroupMap.isOpen}
|
||||
title={`Are you sure want to delete the group mapping for ${
|
||||
title={`Are you sure you want to delete the group mapping for ${
|
||||
(popUp?.deleteLdapGroupMap?.data as { ldapGroupCN: string })?.ldapGroupCN || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteLdapGroupMap", isOpen)}
|
||||
|
||||
@@ -361,7 +361,7 @@ export const LDAPModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDele
|
||||
</Modal>
|
||||
<DeleteActionModal
|
||||
isOpen={isDeletePopupOpen}
|
||||
title="Are you sure want to delete LDAP?"
|
||||
title="Are you sure you want to delete LDAP?"
|
||||
onChange={() => setIsDeletePopupOpen.toggle()}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleLdapSoftDelete}
|
||||
|
||||
@@ -478,7 +478,7 @@ export const OIDCModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDele
|
||||
</Modal>
|
||||
<DeleteActionModal
|
||||
isOpen={isDeletePopupOpen}
|
||||
title="Are you sure want to delete OIDC?"
|
||||
title="Are you sure you want to delete OIDC?"
|
||||
onChange={() => setIsDeletePopupOpen.toggle()}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleOidcSoftDelete}
|
||||
|
||||
@@ -371,7 +371,7 @@ export const SSOModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDelet
|
||||
</Modal>
|
||||
<DeleteActionModal
|
||||
isOpen={isDeletePopupOpen}
|
||||
title="Are you sure want to delete SAML SSO?"
|
||||
title="Are you sure you want to delete SAML SSO?"
|
||||
onChange={() => setIsDeletePopupOpen.toggle()}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={handleSamlSoftDelete}
|
||||
|
||||
@@ -259,7 +259,7 @@ const Page = withPermission(
|
||||
)}
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeMember.isOpen}
|
||||
title={`Are you sure want to remove member with username ${
|
||||
title={`Are you sure you want to remove member with username ${
|
||||
(popUp?.removeMember?.data as { username: string })?.username || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("removeMember", isOpen)}
|
||||
@@ -272,7 +272,7 @@ const Page = withPermission(
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deactivateMember.isOpen}
|
||||
title={`Are you sure want to deactivate member with username ${
|
||||
title={`Are you sure you want to deactivate member with username ${
|
||||
(popUp?.deactivateMember?.data as { username: string })?.username || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deactivateMember", isOpen)}
|
||||
|
||||
@@ -53,7 +53,7 @@ export const UserGroupsSection = ({ orgMembership }: Props) => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeUserFromGroup.isOpen}
|
||||
title="Are you sure want to unassign user from group?"
|
||||
title="Are you sure you want to unassign user from group?"
|
||||
onChange={(isOpen) => handlePopUpToggle("removeUserFromGroup", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() => {
|
||||
|
||||
@@ -87,7 +87,7 @@ export const GroupsSection = () => {
|
||||
<GroupTable handlePopUpOpen={handlePopUpOpen} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteGroup.isOpen}
|
||||
title={`Are you sure want to remove the group ${
|
||||
title={`Are you sure you want to remove the group ${
|
||||
(popUp?.deleteGroup?.data as { name: string })?.name || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteGroup", isOpen)}
|
||||
|
||||
@@ -432,7 +432,7 @@ export const IdentityTab = withProjectPermission(
|
||||
<IdentityModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteIdentity.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.deleteIdentity?.data as { name: string })?.name || ""
|
||||
} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
|
||||
|
||||
@@ -195,7 +195,7 @@ export const ProjectRoleList = () => {
|
||||
<RoleModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteRole.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteRole?.data as TProjectRole)?.name || " "
|
||||
} role?`}
|
||||
deleteKey={(popUp?.deleteRole?.data as TProjectRole)?.slug || ""}
|
||||
|
||||
@@ -184,7 +184,7 @@ const Page = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteIdentity.isOpen}
|
||||
title={`Are you sure want to remove ${identityMembershipDetails?.identity?.name} from the project?`}
|
||||
title={`Are you sure you want to remove ${identityMembershipDetails?.identity?.name} from the project?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteIdentity", isOpen)}
|
||||
deleteKey="remove"
|
||||
onDeleteApproved={() => onRemoveIdentitySubmit()}
|
||||
|
||||
@@ -170,7 +170,7 @@ const Page = () => {
|
||||
<RoleModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteRole.isOpen}
|
||||
title={`Are you sure want to delete the project role ${data?.name ?? ""}?`}
|
||||
title={`Are you sure you want to delete the project role ${data?.name ?? ""}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteRole", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() => onDeleteRoleSubmit()}
|
||||
|
||||
@@ -775,6 +775,7 @@ export const rolePermission2Form = (permissions: TProjectPermission[] = []) => {
|
||||
formVal[subject]![0][ProjectPermissionSecretSyncActions.ImportSecrets] = true;
|
||||
if (canRemoveSecrets)
|
||||
formVal[subject]![0][ProjectPermissionSecretSyncActions.RemoveSecrets] = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject === ProjectPermissionSub.SecretScanningDataSources) {
|
||||
@@ -809,6 +810,8 @@ export const rolePermission2Form = (permissions: TProjectPermission[] = []) => {
|
||||
formVal[subject]![0][ProjectPermissionSecretScanningDataSourceActions.ReadResources] = true;
|
||||
if (canTriggerScans)
|
||||
formVal[subject]![0][ProjectPermissionSecretScanningDataSourceActions.TriggerScans] = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject === ProjectPermissionSub.SecretScanningFindings) {
|
||||
@@ -821,6 +824,8 @@ export const rolePermission2Form = (permissions: TProjectPermission[] = []) => {
|
||||
if (canRead) formVal[subject]![0][ProjectPermissionSecretScanningFindingActions.Read] = true;
|
||||
if (canUpdate)
|
||||
formVal[subject]![0][ProjectPermissionSecretScanningFindingActions.Update] = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject === ProjectPermissionSub.SecretScanningConfigs) {
|
||||
@@ -833,6 +838,8 @@ export const rolePermission2Form = (permissions: TProjectPermission[] = []) => {
|
||||
if (canRead) formVal[subject]![0][ProjectPermissionSecretScanningConfigActions.Read] = true;
|
||||
if (canUpdate)
|
||||
formVal[subject]![0][ProjectPermissionSecretScanningConfigActions.Update] = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject === ProjectPermissionSub.SshHosts) {
|
||||
@@ -857,6 +864,8 @@ export const rolePermission2Form = (permissions: TProjectPermission[] = []) => {
|
||||
conditions: conditions ? convertCaslConditionToFormOperator(conditions) : [],
|
||||
inverted
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject === ProjectPermissionSub.PkiSubscribers) {
|
||||
|
||||
@@ -91,7 +91,7 @@ export const IPAllowlistSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteTrustedIp.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteTrustedIp?.data as { name: string })?.name || " "
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteTrustedIp", isOpen)}
|
||||
|
||||
@@ -166,7 +166,7 @@ export const IntegrationDetailsByIDPage = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteConfirmation.isOpen}
|
||||
title={`Are you sure want to remove ${integration?.integration || " "} integration for ${
|
||||
title={`Are you sure you want to remove ${integration?.integration || " "} integration for ${
|
||||
integration?.app || "this project"
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteConfirmation", isOpen)}
|
||||
|
||||
@@ -237,7 +237,7 @@ export const CloudIntegrationSection = ({
|
||||
)}
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteConfirmation.isOpen}
|
||||
title={`Are you sure want to revoke access ${
|
||||
title={`Are you sure you want to revoke access ${
|
||||
(popUp?.deleteConfirmation.data as TRevokeIntegrationPopUp)?.provider || " "
|
||||
}?`}
|
||||
subTitle="This will remove all the secret integration of this provider!!!"
|
||||
|
||||
@@ -202,7 +202,7 @@ export const NativeIntegrationsTab = () => {
|
||||
)}
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteConfirmation.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.deleteConfirmation.data as TIntegration)?.integration || " "
|
||||
} integration for ${
|
||||
(popUp?.deleteConfirmation.data as TIntegration)?.app || "this project"
|
||||
|
||||
@@ -387,7 +387,7 @@ const Page = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteRotation.isOpen}
|
||||
title="Are you sure want to delete this rotation?"
|
||||
title="Are you sure you want to delete this rotation?"
|
||||
subTitle="This will stop the rotation from dynamically changing. Secret won't be deleted"
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteRotation", isOpen)}
|
||||
deleteKey="delete"
|
||||
|
||||
@@ -79,14 +79,6 @@ export const DeleteProjectSection = () => {
|
||||
};
|
||||
|
||||
const handleLeaveWorkspaceSubmit = async () => {
|
||||
console.log({
|
||||
currentWorkspace,
|
||||
currentOrg,
|
||||
members,
|
||||
isNoAccessMember,
|
||||
membership
|
||||
});
|
||||
|
||||
try {
|
||||
setIsLeaving.on();
|
||||
|
||||
@@ -176,7 +168,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteWorkspace.isOpen}
|
||||
title="Are you sure want to delete this project?"
|
||||
title="Are you sure you want to delete this project?"
|
||||
subTitle={`Permanently delete ${currentWorkspace?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
@@ -186,8 +178,8 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<LeaveProjectModal
|
||||
isOpen={popUp.leaveWorkspace.isOpen}
|
||||
title="Are you sure want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and it's contents.`}
|
||||
title="Are you sure you want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and its contents.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Leave Project"
|
||||
|
||||
@@ -114,7 +114,7 @@ export const EnvironmentSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteEnv.isOpen}
|
||||
title={`Are you sure want to delete ${
|
||||
title={`Are you sure you want to delete ${
|
||||
(popUp?.deleteEnv?.data as { name: string })?.name || " "
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteEnv", isOpen)}
|
||||
|
||||
@@ -142,7 +142,7 @@ export const WorkflowIntegrationTab = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeIntegration.isOpen}
|
||||
title="Are you sure want to remove this integration?"
|
||||
title="Are you sure you want to remove this integration?"
|
||||
onChange={(isOpen) => handlePopUpToggle("removeIntegration", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={async () => {
|
||||
|
||||
@@ -238,7 +238,7 @@ export const SecretScanningResourceRow = ({ resource, dataSource }: Props) => {
|
||||
content={`Manually trigger a scan for this ${resourceDetails.singularNoun}.`}
|
||||
>
|
||||
<div className="flex h-full w-full items-center justify-between gap-1">
|
||||
<span> Trigger Scan</span>
|
||||
<span>Trigger Scan</span>
|
||||
<FontAwesomeIcon
|
||||
className="text-bunker-300"
|
||||
size="sm"
|
||||
|
||||
@@ -293,7 +293,7 @@ export const SecretScanningResourcesTable = ({ dataSource }: Props) => {
|
||||
</THead>
|
||||
<TBody>
|
||||
{canReadResources && isResourcesPending && (
|
||||
<TableSkeleton columns={5} innerKey="resource" />
|
||||
<TableSkeleton columns={4} innerKey="resource" />
|
||||
)}
|
||||
{filteredResources.slice(offset, perPage * page).map((resource) => (
|
||||
<SecretScanningResourceRow
|
||||
|
||||
@@ -274,7 +274,7 @@ export const SecretScanningDataSourceRow = ({
|
||||
content={`Manually trigger a scan for this ${sourceDetails.name} data source.`}
|
||||
>
|
||||
<div className="flex h-full w-full items-center justify-between gap-1">
|
||||
<span> Trigger Scan</span>
|
||||
<span>Trigger Scan</span>
|
||||
<FontAwesomeIcon
|
||||
className="text-bunker-300"
|
||||
size="sm"
|
||||
|
||||
@@ -100,7 +100,7 @@ export const SecretScanningDataSourcesTable = ({ dataSources }: Props) => {
|
||||
return (
|
||||
SECRET_SCANNING_DATA_SOURCE_MAP[type].name.toLowerCase().includes(searchValue) ||
|
||||
name.toLowerCase().includes(searchValue) ||
|
||||
connection.name.toLowerCase().includes(searchValue)
|
||||
(connection && connection.name.toLowerCase().includes(searchValue))
|
||||
);
|
||||
})
|
||||
.sort((a, b) => {
|
||||
|
||||
@@ -27,7 +27,7 @@ type Props = {
|
||||
};
|
||||
|
||||
const FormSchema = z.object({
|
||||
remarks: z.string().optional(),
|
||||
remarks: z.string().max(256, "Cannot exceed 256 characters").optional(),
|
||||
status: z.nativeEnum(SecretScanningFindingStatus)
|
||||
});
|
||||
|
||||
|
||||
@@ -79,14 +79,6 @@ export const DeleteProjectSection = () => {
|
||||
};
|
||||
|
||||
const handleLeaveWorkspaceSubmit = async () => {
|
||||
console.log({
|
||||
currentWorkspace,
|
||||
currentOrg,
|
||||
members,
|
||||
isNoAccessMember,
|
||||
membership
|
||||
});
|
||||
|
||||
try {
|
||||
setIsLeaving.on();
|
||||
|
||||
@@ -170,7 +162,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteWorkspace.isOpen}
|
||||
title="Are you sure want to delete this project?"
|
||||
title="Are you sure you want to delete this project?"
|
||||
subTitle={`Permanently delete ${currentWorkspace?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
@@ -180,8 +172,8 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<LeaveProjectModal
|
||||
isOpen={popUp.leaveWorkspace.isOpen}
|
||||
title="Are you sure want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and it's contents.`}
|
||||
title="Are you sure you want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and its contents.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Leave Project"
|
||||
|
||||
@@ -79,14 +79,6 @@ export const DeleteProjectSection = () => {
|
||||
};
|
||||
|
||||
const handleLeaveWorkspaceSubmit = async () => {
|
||||
console.log({
|
||||
currentWorkspace,
|
||||
currentOrg,
|
||||
members,
|
||||
isNoAccessMember,
|
||||
membership
|
||||
});
|
||||
|
||||
try {
|
||||
setIsLeaving.on();
|
||||
|
||||
@@ -170,7 +162,7 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteWorkspace.isOpen}
|
||||
title="Are you sure want to delete this project?"
|
||||
title="Are you sure you want to delete this project?"
|
||||
subTitle={`Permanently delete ${currentWorkspace?.name} and all of its data. This action is not reversible, so please be careful.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
@@ -180,8 +172,8 @@ export const DeleteProjectSection = () => {
|
||||
|
||||
<LeaveProjectModal
|
||||
isOpen={popUp.leaveWorkspace.isOpen}
|
||||
title="Are you sure want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and it's contents.`}
|
||||
title="Are you sure you want to leave this project?"
|
||||
subTitle={`If you leave ${currentWorkspace?.name} you will lose access to the project and its contents.`}
|
||||
onChange={(isOpen) => handlePopUpToggle("leaveWorkspace", isOpen)}
|
||||
deleteKey="confirm"
|
||||
buttonText="Leave Project"
|
||||
|
||||
@@ -119,7 +119,7 @@ const Page = () => {
|
||||
<SshCaModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSshCa.isOpen}
|
||||
title="Are you sure want to remove the SSH CA from the project?"
|
||||
title="Are you sure you want to remove the SSH CA from the project?"
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSshCa", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
|
||||
@@ -114,7 +114,7 @@ export const SshCertificateTemplatesSection = ({ caId }: Props) => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSshCertificateTemplate.isOpen}
|
||||
title={`Are you sure want to delete the SSH certificate template ${
|
||||
title={`Are you sure you want to delete the SSH certificate template ${
|
||||
(popUp?.deleteSshCertificateTemplate?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSshCertificateTemplate", isOpen)}
|
||||
@@ -127,7 +127,7 @@ export const SshCertificateTemplatesSection = ({ caId }: Props) => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.sshCertificateTemplateStatus.isOpen}
|
||||
title={`Are you sure want to ${
|
||||
title={`Are you sure you want to ${
|
||||
(popUp?.sshCertificateTemplateStatus?.data as { status: string })?.status ===
|
||||
SshCertTemplateStatus.ACTIVE
|
||||
? "enable"
|
||||
|
||||
@@ -85,7 +85,7 @@ export const SshCaSection = () => {
|
||||
<SshCaModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSshCa.isOpen}
|
||||
title="Are you sure want to remove the SSH CA?"
|
||||
title="Are you sure you want to remove the SSH CA?"
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSshCa", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
@@ -94,7 +94,7 @@ export const SshCaSection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.sshCaStatus.isOpen}
|
||||
title={`Are you sure want to ${
|
||||
title={`Are you sure you want to ${
|
||||
(popUp?.sshCaStatus?.data as { status: string })?.status === SshCaStatus.ACTIVE
|
||||
? "enable"
|
||||
: "disable"
|
||||
|
||||
@@ -124,7 +124,7 @@ const Page = () => {
|
||||
<SshHostGroupModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSshHostGroup.isOpen}
|
||||
title={`Are you sure want to remove the SSH group: ${
|
||||
title={`Are you sure you want to remove the SSH group: ${
|
||||
(popUp?.deleteSshHostGroup?.data as { name: string })?.name || ""
|
||||
}?`}
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSshHostGroup", isOpen)}
|
||||
|
||||
@@ -88,7 +88,7 @@ export const SshHostGroupHostsSection = ({ sshHostGroupId }: Props) => {
|
||||
<AddHostGroupMemberModal popUp={popUp} handlePopUpToggle={handlePopUpToggle} />
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.removeHostFromSshHostGroup.isOpen}
|
||||
title={`Are you sure want to remove ${
|
||||
title={`Are you sure you want to remove ${
|
||||
(popUp?.removeHostFromSshHostGroup?.data as { hostname: string; alias?: string })
|
||||
?.alias ||
|
||||
(popUp?.removeHostFromSshHostGroup?.data as { hostname: string; alias?: string })
|
||||
|
||||
@@ -48,7 +48,7 @@ export const DeleteAccountSection = () => {
|
||||
</Button>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteAccount.isOpen}
|
||||
title="Are you sure want to delete your account?"
|
||||
title="Are you sure you want to delete your account?"
|
||||
subTitle="Permanently remove this account and all of its data. This action is not reversible, so please be careful."
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteAccount", isOpen)}
|
||||
deleteKey="confirm"
|
||||
|
||||
@@ -221,7 +221,7 @@ export const MFASection = () => {
|
||||
/>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteTotpConfig.isOpen}
|
||||
title="Are you sure want to delete the configured authenticator?"
|
||||
title="Are you sure you want to delete the configured authenticator?"
|
||||
subTitle="This action is irreversible. You’ll have to go through the setup process to enable it again."
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteTotpConfig", isOpen)}
|
||||
deleteKey="confirm"
|
||||
|
||||
@@ -61,7 +61,7 @@ export const SessionsTable = () => {
|
||||
<>
|
||||
<DeleteActionModal
|
||||
isOpen={popUp.deleteSession.isOpen}
|
||||
title="Are you sure want to sign out of this session?"
|
||||
title="Are you sure you want to sign out of this session?"
|
||||
onChange={(isOpen) => handlePopUpToggle("deleteSession", isOpen)}
|
||||
deleteKey="confirm"
|
||||
onDeleteApproved={() =>
|
||||
|
||||
Reference in New Issue
Block a user