9 lines
284 B
JavaScript
9 lines
284 B
JavaScript
export const EnvProtection = async ({ project, client, $, directory, worktree }) => {
|
|
return {
|
|
'tool.execute.before': async (input, output) => {
|
|
if (input.tool === 'read' && output.args.filePath.includes('.env')) {
|
|
throw new Error('Do not read .env files');
|
|
}
|
|
}
|
|
};
|
|
};
|