agentleFS
truefoundrytruefoundry/tfy-deploy-skills/.cursor/rules/security.mdc

tfy-deploy-skills / rules

Cursor rule1 starsChanged 8 months agoMITView on GitHub

Security rules for TrueFoundry deployments

  • Reads credentials

The file

Show its rules and text

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

15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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 delete any TrueFoundry resource via API or CLI.

    line 12
  2. Distinctive:

    If a user asks to delete something, respond with:

    line 14
  3. Distinctive:

    NEVER put raw credentials, API keys, passwords, or tokens in manifest YAML files

    line 21
  4. Distinctive:

    NEVER log or echo secret values in shell commands

    line 22
  5. Very specific:

    NEVER commit .env files or files containing credentials

    line 23
  6. Very specific:

    Always use tfy-secret://tenant:group:key references for sensitive values

    line 24
  7. Distinctive:

    Create secrets via the TrueFoundry secrets API before referencing them in manifests

    line 25
  8. Very specific:

    Verify TFY_API_KEY is set before making API calls, but never print its value

    line 29
  9. Very specific:

    Use ${TFY_API_KEY:+(set)} pattern to confirm presence without exposing the value

    line 30
  10. Distinctive:

    Never pass API keys as CLI arguments (they appear in process listings)

    line 31
  11. Distinctive:

    NEVER auto-select a workspace, even if only one exists

    line 35
  12. Distinctive:

    Always list available workspaces and require explicit user confirmation

    line 36
  13. Very specific:

    Always set TFY_HOST before running tfy CLI commands

    line 41
  14. Very specific:

    Never run tfy apply with build_source.type: local — use tfy deploy instead

    line 42
  15. Distinctive:

    Never claim a deployment succeeded without verifying terminal state

    line 43

≈ “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 TrueFoundry deployments
alwaysApply: true
---

# TrueFoundry Security Rules

These rules ALWAYS apply, regardless of context. They are non-negotiable safety measures.

## Deletion Protection

NEVER delete any TrueFoundry resource via API or CLI. This includes deployments, services, applications, workspaces, volumes, secrets, and any other resource.

If a user asks to delete something, respond with:
> To delete [resource], go to your TrueFoundry dashboard at `$TFY_BASE_URL`, navigate to [specific path], and delete it from the UI.

This prevents accidental deletions through automation.

## Secret Management

- NEVER put raw credentials, API keys, passwords, or tokens in manifest YAML files
- NEVER log or echo secret values in shell commands
- NEVER commit `.env` files or files containing credentials
- Always use `tfy-secret://tenant:group:key` references for sensitive values
- Create secrets via the TrueFoundry secrets API before referencing them in manifests

## Credential Handling

- Verify `TFY_API_KEY` is set before making API calls, but never print its value
- Use `${TFY_API_KEY:+(set)}` pattern to confirm presence without exposing the value
- Never pass API keys as CLI arguments (they appear in process listings)

## Workspace Safety

- NEVER auto-select a workspace, even if only one exists
- Always list available workspaces and require explicit user confirmation
- This prevents accidental deployments to production environments

## CLI Safety

- Always set `TFY_HOST` before running tfy CLI commands
- Never run `tfy apply` with `build_source.type: local` — use `tfy deploy` instead
- Never claim a deployment succeeded without verifying terminal state
- Pin CLI versions to avoid unexpected behavior from updates

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.