Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/bernierllc/agents-environment-configWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/bernierllc/agents-environment-config/security)<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/security"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/security/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/bernierllc/agents-environment-config/security"><img src="https://agentmods.dev/badge/rules/bernierllc/agents-environment-config/security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00792 | $0.00792 |
| Opus 5.5 | $0.00317 | $0.00317 |
| Sonnet 5.5 | $0.00158 | $0.00158 |
| Haiku 4.5 | $0.00079 | $0.00079 |
Grade A, and why
security scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Rules
Security Standards
Authentication and Authorization
- MCP Servers: If project has APIs, install MCP server for those APIs
- Security Requirements: MCP server MUST respect authorization and authentication
- Environment Restrictions: If cannot respect auth, MUST only run in dev environments
- API Security: Proper authentication for all external APIs
Data Protection
- Sensitive Data: Never commit sensitive data to version control
- Environment Variables: Use environment variables for secrets
- Database Security: Secure database connections and queries
- Input Validation: Validate all user inputs
Security Implementation
API Security
- Authentication: Implement proper authentication mechanisms
- Authorization: Check permissions for all operations
- Rate Limiting: Implement rate limiting for API endpoints
- Input Sanitization: Sanitize all inputs to prevent injection attacks
Database Security
- Connection Security: Use encrypted connections
- Query Security: Use parameterized queries
- Access Control: Implement proper database access controls
- Audit Logging: Log security-relevant database operations
Environment Security
- Development vs Production: Separate security configurations
- Secret Management: Use secure secret management systems
- Network Security: Implement proper network security measures
- Monitoring: Monitor for security incidents
Security Best Practices
Code Security
- Secure Coding: Follow secure coding practices
- Dependency Management: Keep dependencies updated and secure
- Error Handling: Don't expose sensitive information in errors
- Logging: Log security events appropriately
Infrastructure Security
- Server Security: Secure server configurations
- Network Security: Implement proper network security
- Backup Security: Secure backup and recovery procedures
- Incident Response: Have incident response procedures
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 20d ago Changed · -3 tokens per session c29fe7c55fcc
- 1mo ago First seen · 103 lines · 795 tokens per session scan A a17a4ecb55ae
security is a cursor rule published in the GitHub repository bernierllc/agents-environment-config (11 stars, last pushed 11d ago), licensed MIT. It adds 792 tokens to every session, about $0.0032 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
theauth
Use when writing or reviewing auth, agent identity, delegation, tool guarding or MCP OAuth code that uses theAuth (@glinr/theauth).
patchman
Patchman defensive security review defaults.
conventions
Coding conventions, patterns, and hard rules for every file in this repo.
documentation-rules
Cursor rule "documentation-rules" from theronic/eacl, covering generation, api documentation, code documentation, operational docs and african market context.
testing-rules
Cursor rule "testing-rules" from theronic/eacl, covering generation principles, test types, quality guidelines, modifications and african context.
106-auth-checklist
A Chinese-language checklist for authentication and security. Authentication is how software verifies a user or service identity.