cursor-plugin/rules/protect-api-key.mdc
2026-11-28 15:28:07 +02:00

10 lines
714 B
Text

---
description: Keep the MozOut API key out of code, logs, chat and git.
alwaysApply: true
---
- The MozOut API key lives in the `MOZOUT_API_KEY` environment variable. Read it from there in code and in shell commands (`$MOZOUT_API_KEY`).
- Never print, echo or log the key, never paste it into the chat, and never write it into tracked files. To check it, run `test -n "$MOZOUT_API_KEY" && echo set || echo missing`.
- If a project needs a `.env` file, make sure `.env` is in `.gitignore` before writing to it.
- Never put the key in code that runs in a browser or a mobile app: calls to the API must come from a server.
- The API address is fixed: `https://api.mozout.com`. Do not ask the user for another one.