fix: remove jim as sole author of all secret leaks

This commit is contained in:
Scott Wilson
2025-07-10 15:02:38 -07:00
parent b163c74a05
commit c2e326b95a
2 changed files with 16 additions and 5 deletions
@@ -37,7 +37,8 @@ import {
TQueueSecretScanningDataSourceFullScan, TQueueSecretScanningDataSourceFullScan,
TQueueSecretScanningResourceDiffScan, TQueueSecretScanningResourceDiffScan,
TQueueSecretScanningSendNotification, TQueueSecretScanningSendNotification,
TSecretScanningDataSourceWithConnection TSecretScanningDataSourceWithConnection,
TSecretScanningFinding
} from "./secret-scanning-v2-types"; } from "./secret-scanning-v2-types";
type TSecretRotationV2QueueServiceFactoryDep = { type TSecretRotationV2QueueServiceFactoryDep = {
@@ -459,13 +460,16 @@ export const secretScanningV2QueueServiceFactory = async ({
const newFindings = allFindings.filter((finding) => finding.scanId === scanId); const newFindings = allFindings.filter((finding) => finding.scanId === scanId);
if (newFindings.length) { if (newFindings.length) {
const finding = newFindings[0] as TSecretScanningFinding;
await queueService.queuePg(QueueJobs.SecretScanningV2SendNotification, { await queueService.queuePg(QueueJobs.SecretScanningV2SendNotification, {
status: SecretScanningScanStatus.Completed, status: SecretScanningScanStatus.Completed,
resourceName: resource.name, resourceName: resource.name,
isDiffScan: true, isDiffScan: true,
dataSource, dataSource,
numberOfSecrets: newFindings.length, numberOfSecrets: newFindings.length,
scanId scanId,
authorName: finding?.details?.author,
authorEmail: finding?.details?.email
}); });
} }
@@ -582,8 +586,8 @@ export const secretScanningV2QueueServiceFactory = async ({
substitutions: substitutions:
payload.status === SecretScanningScanStatus.Completed payload.status === SecretScanningScanStatus.Completed
? { ? {
authorName: "Jim", authorName: payload.authorName,
authorEmail: "[email protected]", authorEmail: payload.authorEmail,
resourceName, resourceName,
numberOfSecrets: payload.numberOfSecrets, numberOfSecrets: payload.numberOfSecrets,
isDiffScan: payload.isDiffScan, isDiffScan: payload.isDiffScan,
@@ -119,7 +119,14 @@ export type TQueueSecretScanningSendNotification = {
resourceName: string; resourceName: string;
} & ( } & (
| { status: SecretScanningScanStatus.Failed; errorMessage: string } | { status: SecretScanningScanStatus.Failed; errorMessage: string }
| { status: SecretScanningScanStatus.Completed; numberOfSecrets: number; scanId: string; isDiffScan: boolean } | {
status: SecretScanningScanStatus.Completed;
numberOfSecrets: number;
scanId: string;
isDiffScan: boolean;
authorName?: string;
authorEmail?: string;
}
); );
export type TCloneRepository = { export type TCloneRepository = {