agentleFS
rx-chenxiangrx-chenxiang/monorepo-workflow/.cursor/rules/security.md

monorepo-workflow / rules

Cursor rule1 starsChanged 4 months agoMITView on GitHub

每次提交前必须确认: - [ ] 无硬编码密钥(API Key、密码、Token) - [ ] 所有用户输入已校验 - [ ] SQL 注入防护(使用参数化查询) - [ ] XSS 防护(HTML 已消毒处理) - [ ] CSRF 保护已启用 - [ ] 认证/授权已验证 - [ ] 所有端点已配置速率限制 - [ ] 错误信息不泄露敏感数据 发现安全问题时: 1. 立即停止当前工作 2. 使用 security-reviewer Agent 进行分析 3. 优先修复 CRITICAL 级别问题 4. 轮换所有可能已泄露的密钥 5. 排查整个代码库是否存在类似问题

The file

Files
security.md

安全准则

强制安全检查

每次提交前必须确认:

  • 无硬编码密钥(API Key、密码、Token)
  • 所有用户输入已校验
  • SQL 注入防护(使用参数化查询)
  • XSS 防护(HTML 已消毒处理)
  • CSRF 保护已启用
  • 认证/授权已验证
  • 所有端点已配置速率限制
  • 错误信息不泄露敏感数据

密钥管理

  • 绝对不要在源代码中硬编码密钥
  • 始终使用环境变量或密钥管理服务
  • 在应用启动时校验必需密钥是否存在
  • 任何可能已泄露的密钥必须立即轮换

安全事件响应流程

发现安全问题时:

  1. 立即停止当前工作
  2. 使用 security-reviewer Agent 进行分析
  3. 优先修复 CRITICAL 级别问题
  4. 轮换所有可能已泄露的密钥
  5. 排查整个代码库是否存在类似问题

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.