fix(secrets-service): throw on invalid env / path

This commit is contained in:
Daniel Hougaard
2025-08-26 19:55:52 +02:00
parent 8ffff7e779
commit 8f00bab61c
3 changed files with 41 additions and 1 deletions
@@ -97,6 +97,7 @@ import {
} from "./secret-types";
import { TSecretVersionDALFactory } from "./secret-version-dal";
import { TSecretVersionTagDALFactory } from "./secret-version-tag-dal";
import { validateSecretPath } from "../secret-v2-bridge/secret-v2-bridge-fns";
type TSecretServiceFactoryDep = {
secretDAL: TSecretDALFactory;
@@ -616,6 +617,15 @@ export const secretServiceFactory = ({
actionProjectType: ActionProjectType.SecretManager
});
await validateSecretPath(
{
projectId,
environment,
secretPath: path
},
folderDAL
);
let paths: { folderId: string; path: string }[] = [];
if (recursive) {