agentleFS
joaoguimaraesprojoaoguimaraespro/personal-finance/.cursor/rules/project-security.mdc

personal-finance / rules

Cursor rule1 starsChanged todayMITView on GitHub

Personal Finance security checks: auth with MFA and CSRF, broker keys, AI policy gateway and write access, imports and exports, VPN-only exposure, dependencies

The file

We split this project-security.mdc into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read SECURITY.md, docs/security.md and the ADRs a change touches before judging it.

    line 9
  2. Distinctive:

    Injection: no raw SQL, no string-built queries, no shell calls with user input.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 6,809 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
project-security.mdc
---
description: "Personal Finance security checks: auth with MFA and CSRF, broker keys, AI policy gateway and write access, imports and exports, VPN-only exposure, dependencies"
globs: backend/src/**,web/src/**,deploy/**,web/package.json,backend/Directory.Packages.props
alwaysApply: false
---
<!-- Generated by armature from .claude/rules/project/security.md. Edit the source rule, not this file. -->
# Security (project rules)

Read [SECURITY.md](../../SECURITY.md), [docs/security.md](../../docs/security.md) and the ADRs a change touches
before judging it. These add to the generic `security-reviewer` agent and the `*/security.md` pack rules.

1. **Brokers** ([ADR-0005](../../docs/adr/0005-read-only-broker-integrations.md),
   [ADR-0009](../../docs/adr/0009-binance-read-only-key.md)): read-only only; a new endpoint goes on the allow-list;
   the Binance sync checks the key's restrictions before reading data; API keys are never logged or returned.
2. **AuthN/AuthZ** ([ADR-0002](../../docs/adr/0002-built-in-identity.md)): every new endpoint requires auth and the
   right policy; mandatory TOTP MFA and the CSRF protection are never bypassed.
3. **AI** ([ADR-0006](../../docs/adr/0006-ai-policy-gateway.md), [ADR-0008](../../docs/adr/0008-ai-write-access.md),
   [ADR-0012](../../docs/adr/0012-desktop-mcp.md)): every AI path goes through the policy gateway (scoped, hashed,
   revocable client tokens, rate limits, audit). Tools are purpose-built with minimal DTOs; free text is returned in
   untrusted fields; no SQL, shell or file tools. Writes only through the opt-in write scopes, typed single-record
   tools, the write budget and the application's own commands and validators; never a new path that lets the model
   write outside that flow. The desktop MCP listens on loopback only.
4. **Imports and exports:** size limits, type checks, path traversal, CSV/Excel formula injection on export.
5. **Injection:** no raw SQL, no string-built queries, no shell calls with user input.
6. **Secrets and personal data:** none in code, logs, fixtures, tests, specs or screenshots. The repo is public.
7. **Exposure** ([ADR-0003](../../docs/adr/0003-vpn-only-exposure.md)): nothing may assume the app is reachable
   outside the VPN, and nothing may widen what is published beyond loopback.
8. **Dependencies:** for new or bumped packages run `cd web && npm audit --audit-level=high` and
   `cd backend && dotnet list package --vulnerable`.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.