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

Function isSensitiveFile

cli/src/utils/create-run-config.ts:83–94  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

81 * Check if a file is a sensitive file that should be blocked from reading.
82 */
83export function isSensitiveFile(filePath: string): boolean {
84 const basename = path.basename(filePath)
85 const basenameLower = basename.toLowerCase()
86 const ext = path.extname(filePath).toLowerCase()
87
88 return (
89 isEnvFile(basename) ||
90 SENSITIVE_EXTENSIONS.has(ext) ||
91 SENSITIVE_BASENAMES.has(basename) ||
92 matchesPattern(basenameLower)
93 )
94}
95
96export const createRunConfig = (params: CreateRunConfigParams) => {
97 const {

Callers 4

FilePathsDescriptionFunction · 0.90
renderFunction · 0.90
createRunConfigFunction · 0.85

Calls 2

isEnvFileFunction · 0.85
matchesPatternFunction · 0.85

Tested by

no test coverage detected