Skip to content

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

Feedback

x0322059e896563ede5
diff --git a/backend/src/ee/services/secret-scanning-v2/bitbucket/bitbucket-secret-scanning-factory.ts b/backend/src/ee/services/secret-scanning-v2/bitbucket/bitbucket-secret-scanning-factory.ts
index e624c7d5d0..f51c75daa8 100644
--- a/backend/src/ee/services/secret-scanning-v2/bitbucket/bitbucket-secret-scanning-factory.ts
+++ b/backend/src/ee/services/secret-scanning-v2/bitbucket/bitbucket-secret-scanning-factory.ts
@@ -149,9 +149,9 @@ export const BitbucketSecretScanningFactory = () => {
filteredRepos.push(...repos.filter((repo) => includeRepos.includes(repo.full_name)));
}
- return filteredRepos.map(({ full_name }) => ({
+ return filteredRepos.map(({ full_name, uuid }) => ({
name: full_name,
- externalId: full_name,
+ externalId: uuid,
type: SecretScanningResource.Repository
}));
};
@@ -188,7 +188,7 @@ export const BitbucketSecretScanningFactory = () => {
> = ({ repository }) => {
return {
name: repository.full_name,
- externalId: repository.full_name,
+ externalId: repository.uuid,
type: SecretScanningResource.Repository
};
};
diff --git a/backend/src/ee/services/secret-scanning-v2/secret-scanning-v2-union-schemas.ts b/backend/src/ee/services/secret-scanning-v2/secret-scanning-v2-union-schemas.ts
index bfac2b5315..671d4e16b1 100644
--- a/backend/src/ee/services/secret-scanning-v2/secret-scanning-v2-union-schemas.ts
+++ b/backend/src/ee/services/secret-scanning-v2/secret-scanning-v2-union-schemas.ts
@@ -9,6 +9,14 @@ export const SecretScanningDataSourceSchema = z.discriminatedUnion("type", [
]);
export const SecretScanningFindingSchema = z.discriminatedUnion("dataSourceType", [
- GitHubFindingSchema,
- BitbucketFindingSchema
+ GitHubFindingSchema.describe(
+ JSON.stringify({
+ title: "GitHub"
+ })
+ ),
+ BitbucketFindingSchema.describe(
+ JSON.stringify({
+ title: "Bitbucket"
+ })
+ )
]);
diff --git a/backend/src/server/plugins/secret-scanner-v2.ts b/backend/src/server/plugins/secret-scanner-v2.ts
index ad631b683d..63a7f97ce9 100644
--- a/backend/src/server/plugins/secret-scanner-v2.ts
+++ b/backend/src/server/plugins/secret-scanner-v2.ts
@@ -1,6 +1,5 @@
import type { EmitterWebhookEventName } from "@octokit/webhooks/dist-types/types";
import { PushEvent } from "@octokit/webhooks-types";
-import crypto from "crypto";
import { Probot } from "probot";
import { z } from "zod";
diff --git a/backend/src/server/routes/v1/app-connection-routers/bitbucket-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/bitbucket-connection-router.ts
index 3f9ca90599..7fe5113e5c 100644
--- a/backend/src/server/routes/v1/app-connection-routers/bitbucket-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/bitbucket-connection-router.ts
@@ -66,7 +66,7 @@ export const registerBitbucketConnectionRouter = async (server: FastifyZodProvid
}),
response: {
200: z.object({
- repositories: z.object({ slug: z.string(), full_name: z.string() }).array()
+ repositories: z.object({ slug: z.string(), full_name: z.string(), uuid: z.string() }).array()
})
}
},
diff --git a/backend/src/services/app-connection/bitbucket/bitbucket-connection-types.ts b/backend/src/services/app-connection/bitbucket/bitbucket-connection-types.ts
index 53e93b4793..b0694c6e39 100644
--- a/backend/src/services/app-connection/bitbucket/bitbucket-connection-types.ts
+++ b/backend/src/services/app-connection/bitbucket/bitbucket-connection-types.ts
@@ -34,6 +34,7 @@ export type TBitbucketWorkspace = {
};
export type TBitbucketRepo = {
+ uuid: string;
full_name: string; // workspace-slug/repo-slug
slug: string;
};
diff --git a/docs/documentation/platform/secret-scanning/bitbucket.mdx b/docs/documentation/platform/secret-scanning/bitbucket.mdx
index 397ee6017d..c5feb5b062 100644
--- a/docs/documentation/platform/secret-scanning/bitbucket.mdx
+++ b/docs/documentation/platform/secret-scanning/bitbucket.mdx
@@ -6,7 +6,7 @@ description: "Learn how to configure secret scanning for Bitbucket."
## Prerequisites
-- Create a [Bitbucket Connection](/integrations/app-connections/bitbucket)
+- Create a [Bitbucket Connection](/integrations/app-connections/bitbucket) with Secret Scanning permissions
## Create a Bitbucket Data Source in Infisical
@@ -17,6 +17,8 @@ description: "Learn how to configure secret scanning for Bitbucket."
2. Select the **Bitbucket** option.
+ ![Select Bitbucket](/images/platform/secret-scanning/bitbucket/step-2.png)
+
3. Configure which workspace and repositories you would like to scan. Then click **Next**.
![Data Source Configuration](/images/platform/secret-scanning/bitbucket/step-3.png)
diff --git a/docs/images/app-connections/bitbucket/step-4.png b/docs/images/app-connections/bitbucket/step-4.png
index 95b4095d83..e69de29bb2 100644
Binary files a/docs/images/app-connections/bitbucket/step-4.png and b/docs/images/app-connections/bitbucket/step-4.png differ
diff --git a/docs/images/platform/secret-scanning/bitbucket/step-2.png b/docs/images/platform/secret-scanning/bitbucket/step-2.png
new file mode 100644
index 0000000000..0d10951a47
Binary files /dev/null and b/docs/images/platform/secret-scanning/bitbucket/step-2.png differ
diff --git a/docs/integrations/app-connections/bitbucket.mdx b/docs/integrations/app-connections/bitbucket.mdx
index 0af1a23b60..6c09505afe 100644
--- a/docs/integrations/app-connections/bitbucket.mdx
+++ b/docs/integrations/app-connections/bitbucket.mdx
@@ -5,21 +5,29 @@ description: "Learn how to configure a Bitbucket Connection for Infisical."
Infisical supports the use of [API Tokens](https://support.atlassian.com/bitbucket-cloud/docs/api-tokens/) to connect with Bitbucket.
+<Tip>
+ Infisical recommends creating a dedicated Bitbucket account with access restricted to only the repositories you want to scan.
+</Tip>
+
## Create Bitbucket Access Token
<Steps>
<Step title="Create API Token">
- Go to [Account API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens) and click 'Create API token with scopes'.
+ Go to [Account API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens) and click **Create API token with scopes**.
![Create API Token](/images/app-connections/bitbucket/step-1.png)
</Step>
<Step title="Set Name and Expiry">
- Set the name and expiration date of the token, then click 'Next'. Keep in mind that you'll need to manually replace the token after it expires.
+ Set the name and expiration date of the token, then click **Next**.
![Set Name and Expiry](/images/app-connections/bitbucket/step-2.png)
+
+ <Note>
+ Keep in mind that you'll need to manually replace the token after it expires.
+ </Note>
</Step>
<Step title="Select 'Bitbucket'">
- Select 'Bitbucket' and then click 'Next'.
+ Select 'Bitbucket' and then click **Next**.
![Select Bitbucket](/images/app-connections/bitbucket/step-3.png)
</Step>
@@ -36,12 +44,13 @@ Infisical supports the use of [API Tokens](https://support.atlassian.com/bitbuck
delete:webhook:bitbucket
read:repository:bitbucket
```
+
+ ![Configure Permissions](/images/app-connections/bitbucket/step-4.png)
</Tab>
</Tabs>
Click 'Next'.
- ![Configure Permissions](/images/app-connections/bitbucket/step-4.png)
</Step>
<Step title="Copy Token">
Save the API Token for later steps.
@@ -61,7 +70,7 @@ Infisical supports the use of [API Tokens](https://support.atlassian.com/bitbuck
![App Connections Tab](/images/app-connections/general/add-connection.png)
</Step>
<Step title="Select Bitbucket Connection">
- Click the 'Add new connection' button and select 'Bitbucket' from the list of available connections.
+ Click the **Add new connection** button and select 'Bitbucket' from the list of available connections.
</Step>
<Step title="Fill out the Bitbucket Connection Modal">
Complete the Bitbucket Connection form by entering:
diff --git a/frontend/src/hooks/api/appConnections/bitbucket/types.ts b/frontend/src/hooks/api/appConnections/bitbucket/types.ts
index 5d00e4e810..e7e653a939 100644
--- a/frontend/src/hooks/api/appConnections/bitbucket/types.ts
+++ b/frontend/src/hooks/api/appConnections/bitbucket/types.ts
@@ -3,6 +3,7 @@ export type TBitbucketWorkspace = {
};
export type TBitbucketRepo = {
+ uuid: string;
slug: string;
full_name: string; // workspace-slug/repo-slug
};
diff --git a/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/components/SecretScanningDataSourcesTable.tsx b/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/components/SecretScanningDataSourcesTable.tsx
index f07e229a93..2e6698a48c 100644
--- a/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/components/SecretScanningDataSourcesTable.tsx
+++ b/frontend/src/pages/secret-scanning/SecretScanningDataSourcesPage/components/SecretScanningDataSourcesTable.tsx
@@ -294,7 +294,7 @@ export const SecretScanningDataSourcesTable = ({ dataSources }: Props) => {
<Table>
<THead>
<Tr>
- <Th className="w-60">Platform</Th>
+ <Th className="min-w-36">Platform</Th>
<Th className="w-1/3">
<div className="flex items-center">
Name