Skip to content

Commit b6831c2

Browse files
committed
feat: add environment access policy to restrict usage of .env files and enforce env.ts as the sole configuration source
1 parent ffcb29e commit b6831c2

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.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 `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 `env.ts` instead of reading the `.env*` file.
14+
15+
Reference: [env.ts](mdc:env.ts)
16+

0 commit comments

Comments
 (0)