Compare commits

..

4 Commits

Author SHA1 Message Date
1567239fc2 improvement: use secret path input for create policy modal 2025-07-10 16:05:37 -07:00
aae5831f35 Merge pull request #4001 from Infisical/server-admin-sidebar-improvements
improvement(frontend): Server admin sidebar improvements
2025-07-10 15:44:25 -07:00
6f78a6b4c1 Merge pull request #4000 from Infisical/fix-remove-jim-as-sole-author-of-secret-leaks
fix(secret-scanning-v2): Remove Jim as sole author of all secret leaks
2025-07-10 15:41:24 -07:00
c2e326b95a fix: remove jim as sole author of all secret leaks 2025-07-10 15:02:38 -07:00
3 changed files with 19 additions and 6 deletions

View File

@ -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: "jim@infisical.com", authorEmail: payload.authorEmail,
resourceName, resourceName,
numberOfSecrets: payload.numberOfSecrets, numberOfSecrets: payload.numberOfSecrets,
isDiffScan: payload.isDiffScan, isDiffScan: payload.isDiffScan,

View File

@ -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 = {

View File

@ -21,6 +21,7 @@ import {
Tag, Tag,
Tooltip Tooltip
} from "@app/components/v2"; } from "@app/components/v2";
import { SecretPathInput } from "@app/components/v2/SecretPathInput";
import { useWorkspace } from "@app/context"; import { useWorkspace } from "@app/context";
import { getMemberLabel } from "@app/helpers/members"; import { getMemberLabel } from "@app/helpers/members";
import { policyDetails } from "@app/helpers/policies"; import { policyDetails } from "@app/helpers/policies";
@ -202,6 +203,7 @@ const Form = ({
const formUserBypassers = watch("userBypassers"); const formUserBypassers = watch("userBypassers");
const formGroupBypassers = watch("groupBypassers"); const formGroupBypassers = watch("groupBypassers");
const formEnvironment = watch("environment")?.slug;
const bypasserCount = (formUserBypassers || []).length + (formGroupBypassers || []).length; const bypasserCount = (formUserBypassers || []).length + (formGroupBypassers || []).length;
const handleCreatePolicy = async ({ const handleCreatePolicy = async ({
@ -469,7 +471,7 @@ const Form = ({
errorText={error?.message} errorText={error?.message}
className="flex-1" className="flex-1"
> >
<Input {...field} value={field.value || ""} /> <SecretPathInput {...field} value={field.value} environment={formEnvironment} />
</FormControl> </FormControl>
)} )}
/> />