MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / checkPlaceholderSecrets

Function checkPlaceholderSecrets

apps/api/src/config/env/validate.ts:570–587  ·  view source on GitHub ↗
(env: Env)

Source from the content-addressed store, hash-verified

568];
569
570const checkPlaceholderSecrets = (env: Env): string[] => {
571 if (env.NODE_ENV !== "production") {
572 return [];
573 }
574
575 return PLACEHOLDER_SECRET_FIELDS.flatMap(({ name, generator }) => {
576 const value = env[name];
577
578 if (typeof value !== "string" || !isPlaceholderSecret(value)) {
579 return [];
580 }
581
582 return [
583 `${name} looks like a placeholder ("${value}"). ` +
584 `Generate a real value with \`${generator}\` and set it before boot.`,
585 ];
586 });
587};
588
589const checkAIProvider = (env: Env): string[] => {
590 if (!env.AI_ENABLED || env.NODE_ENV === "test") {

Callers 1

checkInvariantsFunction · 0.85

Calls 1

isPlaceholderSecretFunction · 0.85

Tested by

no test coverage detected