Skip to content

Commit cf004cd

Browse files
authored
chore: Add environment access policy to restrict .env file usage (#5)
1 parent 8cc1fea commit cf004cd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.cursor/rules/env-access.mdc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
alwaysApply: true
3+
description: Disallow accessing .env* files; use env.ts as the single source of truth for environment configuration
4+
---
5+
6+
# Environment access policy
7+
8+
- Do not open, read, or reference any files matching:
9+
- `.env`
10+
- `.env.*`
11+
- `.env*`
12+
- Treat `src/env.ts` as the only allowed source of environment configuration. Use it whenever environment info is required.
13+
- If a needed value appears only in a `.env*` file, stop and ask to add it to `src/env.ts` instead of reading the `.env*` file.
14+
15+
Reference: [env.ts](mdc:src/env.ts)
16+

0 commit comments

Comments
 (0)