This commit is contained in:
x032205
2025-07-07 20:26:35 -04:00
parent 64744d042d
commit 9e896563ed
11 changed files with 34 additions and 14 deletions
@@ -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
};
};
@@ -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"
})
)
]);
@@ -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";
@@ -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()
})
}
},
@@ -34,6 +34,7 @@ export type TBitbucketWorkspace = {
};
export type TBitbucketRepo = {
uuid: string;
full_name: string; // workspace-slug/repo-slug
slug: string;
};