MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / matchesPattern

Function matchesPattern

cli/src/utils/create-run-config.ts:66–71  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

64 !isEnvTemplateFile(basename)
65
66const matchesPattern = (str: string) =>
67 SENSITIVE_PATTERNS.prefix.some(
68 (p) => str.startsWith(p) && !str.endsWith('.pub'),
69 ) ||
70 SENSITIVE_PATTERNS.suffix.some((s) => str.endsWith(s)) ||
71 SENSITIVE_PATTERNS.substring.some((sub) => str.includes(sub))
72
73const ENV_TEMPLATE_SUFFIXES = ['.env.example', '.env.sample', '.env.template']
74

Callers 1

isSensitiveFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected