mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-09 21:14:22 +00:00
63 lines
2.7 KiB
TypeScript
63 lines
2.7 KiB
TypeScript
export const getProviderHelpText = (provider: string) => {
|
|
switch (provider) {
|
|
case "aws":
|
|
return {
|
|
text: "Need help connecting your AWS account?",
|
|
link: "https://goto.prowler.com/provider-aws",
|
|
};
|
|
case "azure":
|
|
return {
|
|
text: "Need help connecting your Azure subscription?",
|
|
link: "https://goto.prowler.com/provider-azure",
|
|
};
|
|
case "m365":
|
|
return {
|
|
text: "Need help connecting your Microsoft 365 account?",
|
|
link: "https://goto.prowler.com/provider-m365",
|
|
};
|
|
case "gcp":
|
|
return {
|
|
text: "Need help connecting your GCP project?",
|
|
link: "https://goto.prowler.com/provider-gcp",
|
|
};
|
|
case "kubernetes":
|
|
return {
|
|
text: "Need help connecting your Kubernetes cluster?",
|
|
link: "https://goto.prowler.com/provider-k8s",
|
|
};
|
|
case "github":
|
|
return {
|
|
text: "Need help connecting your GitHub account?",
|
|
link: "https://goto.prowler.com/provider-github",
|
|
};
|
|
default:
|
|
return {
|
|
text: "How to setup a provider?",
|
|
link: "https://goto.prowler.com/provider-help",
|
|
};
|
|
}
|
|
};
|
|
|
|
export const getAWSCredentialsTemplateScanLinks = (externalId: string) => {
|
|
return {
|
|
cloudformation:
|
|
"https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/cloudformation/prowler-scan-role.yml",
|
|
cloudformationQuickLink: `https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fprowler-cloud-public.s3.eu-west-1.amazonaws.com%2Fpermissions%2Ftemplates%2Faws%2Fcloudformation%2Fprowler-scan-role.yml&stackName=ProwlerScanRole¶m_ExternalId=${externalId}`,
|
|
terraform:
|
|
"https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/terraform/main.tf",
|
|
};
|
|
};
|
|
|
|
export const getAWSCredentialsTemplateBucketLinks = (
|
|
bucketName: string,
|
|
externalId: string,
|
|
) => {
|
|
return {
|
|
cloudformation:
|
|
"https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/cloudformation/prowler-scan-role.yml",
|
|
cloudformationQuickLink: `https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fprowler-cloud-public.s3.eu-west-1.amazonaws.com%2Fpermissions%2Ftemplates%2Faws%2Fcloudformation%2Fprowler-scan-role-with-s3-integration.yml&stackName=ProwlerScanS3Integration¶m_AccountId=232136659152¶m_IAMPrincipal=role%2Fprowler*¶m_ExternalId=${externalId}¶m_S3IntegrationBucketName=${bucketName}`,
|
|
terraform:
|
|
"https://github.com/prowler-cloud/prowler/blob/master/permissions/templates/terraform/main.tf",
|
|
};
|
|
};
|