agentleFS
Atakan-EmreAtakan-Emre/agentic-workflow-lab/.cursor/rules/security.mdc

agentic-workflow-lab / rules

Cursor rule0 starsChanged 5 months agoMITView on GitHub

Security rules for agent-ready repository changes

  • Pipes a download into a shell
  • Reads credentials
  • Deletes or force-pushes
  • Commits and pushes

The file

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

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Never commit secrets, tokens, API keys or credentials.

    line 12
  2. Distinctive:

    Do not add commands that download and execute remote scripts.

    line 13
  3. Distinctive:

    Do not enable destructive commands by default.

    line 14
  4. Distinctive:

    Write-capable tools must require approval.

    line 17
  5. Distinctive:

    Keep MCP demo tools read-only unless a policy and validation test are added.

    line 18

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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
security.mdc
---
description: Security rules for agent-ready repository changes
globs:
  - "**/*.py"
  - "**/*.yaml"
  - "**/*.md"
alwaysApply: false
---

# Security Rules

- Never commit secrets, tokens, API keys or credentials.
- Do not add commands that download and execute remote scripts.
- Do not enable destructive commands by default.
- External writes must remain disabled unless explicitly modeled through policy.
- Shell execution must be justified and documented.
- Write-capable tools must require approval.
- Keep MCP demo tools read-only unless a policy and validation test are added.

## Forbidden patterns

- `git push --force`
- `git reset --hard`
- `curl ... | bash` / `wget ... | sh`
- `Invoke-Expression` on remote content
- Committing `.env`, keys, or credential files

## Sensitive paths

Extra care required when editing:

- `policies/`
- `schemas/`
- `.github/workflows/`
- `scripts/validate_*.py`
- `mcp/server.py`

Review against `policies/security-policy.yaml` and `policies/tool-policy.yaml`.

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.