(filePath: string)
| 81 | * Check if a file is a sensitive file that should be blocked from reading. |
| 82 | */ |
| 83 | export 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 | |
| 96 | export const createRunConfig = (params: CreateRunConfigParams) => { |
| 97 | const { |
no test coverage detected