AgentsConfigHelper / rules
Cursor rule2 starsChanged 3 months agoMITView on GitHub
Additional Cryptography guidance
We split this codeguard-0-additional-cryptography.mdc into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 27
Use authenticated encryption.
- Distinctive: line 39
Test: short max‑age (e.g., 86400) with includeSubDomains
- Distinctive: line 44
Avoid browser HPKP. Consider pinning only for controlled clients (e.g., mobile) and when you own both ends.
- Distinctive: line 45
Prefer SPKI pinning with backup pins.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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.
Files
--- description: Additional Cryptography guidance globs: **/*.c,**/*.go,**/*.h,**/*.java,**/*.js,**/*.jsx,**/*.kt,**/*.kts,**/*.m,**/*.mjs,**/*.php,**/*.py,**/*.pyi,**/*.pyx,**/*.rb,**/*.swift,**/*.ts,**/*.tsx,**/*.wsdl,**/*.xml,**/*.xsd,**/*.xslt,**/*.yaml,**/*.yml version: 1.0.1 --- rule_id: codeguard-0-additional-cryptography ## Additional Cryptography & TLS Apply modern, vetted cryptography for data at rest and in transit. Manage keys safely, configure TLS correctly, deploy HSTS, and consider pinning only when appropriate. ### Algorithms and Modes - Symmetric: AES‑GCM or ChaCha20‑Poly1305 preferred. Avoid ECB. CBC/CTR only with encrypt‑then‑MAC. - Asymmetric: RSA ≥2048 or modern ECC (Curve25519/Ed25519). Use OAEP for RSA encryption. - Hashing: SHA‑256+ for integrity; avoid MD5/SHA‑1. - RNG: Use CSPRNG appropriate to platform (e.g., SecureRandom, crypto.randomBytes, secrets module). Never use non‑crypto RNGs. ### Key Management - Generate keys within validated modules (HSM/KMS) and never from passwords or predictable inputs. - Separate keys by purpose (encryption, signing, wrapping). Rotate on compromise, cryptoperiod, or policy. - Store keys in KMS/HSM or vault; never hardcode; avoid plain env vars. Use KEK to wrap DEKs; store separately. - Control access to trust stores; validate updates; audit all key access and operations. ### Data at Rest - Encrypt sensitive data; minimize stored secrets; tokenize where possible. - Use authenticated encryption; manage nonces/IVs properly; keep salts unique per item. - Protect backups: encrypt, restrict access, test restores, manage retention. ### TLS Configuration - Protocols: TLS 1.3 preferred; allow TLS 1.2 only for legacy compatibility; disable TLS 1.0/1.1 and SSL. Enable TLS_FALLBACK_SCSV. - Ciphers: prefer AEAD suites; disable NULL/EXPORT/anon. Keep libraries updated; disable compression. - Key exchange groups: prefer x25519/secp256r1; configure secure FFDHE groups if needed. - Certificates: 2048‑bit+ keys, SHA‑256, correct CN/SAN. Manage lifecycle and revocation (OCSP stapling). - Application: HTTPS site‑wide; redirect HTTP→HTTPS; prevent mixed content; set cookies `Secure`. ### HSTS - Send Strict‑Transport‑Security only over HTTPS. Phase rollout: - Test: short max‑age (e.g., 86400) with includeSubDomains - Prod: ≥1 year max‑age; includeSubDomains when safe - Optional preload once mature; understand permanence and subdomain impact ### Pinning - Avoid browser HPKP. Consider pinning only for controlled clients (e.g., mobile) and when you own both ends. - Prefer SPKI pinning with backup pins; plan secure update channels; never allow user bypass. - Thoroughly test rotation and failure handling; understand operational risk. ### Implementation Checklist - AEAD everywhere; vetted libraries only; no custom crypto. - Keys generated and stored in KMS/HSM; purpose‑scoped; rotation documented. - TLS 1.3/1.2 with strong ciphers; compression off; OCSP stapling on. - HSTS deployed per phased plan; mixed content eliminated. - Pinning used only where justified, with backups and update path. ### Test Plan - Automated config scans (e.g., SSL Labs, testssl.sh) for protocol/cipher/HSTS. - Code review for crypto API misuse; tests for key rotation, backup/restore. - Pinning simulations for rotation/failures if deployed.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Other versions2 projects use a version of this.
Word for word · 2
- cisco-ai-defense/skill-scanner★ 2.7k100% same
- shrav89/skill-scanner★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/codeguard-0-api-web-services.mdcCursor rule
- .cursor/rules/codeguard-0-authentication-mfa.mdcCursor rule
- .cursor/rules/codeguard-0-authorization-access-control.mdcCursor rule
- .cursor/rules/codeguard-0-client-side-web-security.mdcCursor rule
- .cursor/rules/codeguard-0-cloud-orchestration-kubernetes.mdcCursor rule
- .cursor/rules/codeguard-0-data-storage.mdcCursor rule
- .cursor/rules/codeguard-0-devops-ci-cd-containers.mdcCursor rule
- .cursor/rules/codeguard-0-file-handling-and-uploads.mdcCursor rule
- .cursor/rules/codeguard-0-framework-and-languages.mdcCursor rule
- .cursor/rules/codeguard-0-iac-security.mdcCursor rule
- .cursor/rules/codeguard-0-input-validation-injection.mdcCursor rule
- .cursor/rules/codeguard-0-logging.mdcCursor rule
- .cursor/rules/codeguard-0-mobile-apps.mdcCursor rule
- .cursor/rules/codeguard-0-privacy-data-protection.mdcCursor rule
- .cursor/rules/codeguard-0-safe-c-functions.mdcCursor rule
- .cursor/rules/codeguard-0-session-management-and-cookies.mdcCursor rule
- .cursor/rules/codeguard-0-supply-chain-security.mdcCursor rule
- .cursor/rules/codeguard-0-xml-and-serialization.mdcCursor rule
- .cursor/rules/codeguard-1-crypto-algorithms.mdcCursor rule
- .cursor/rules/codeguard-1-digital-certificates.mdcCursor rule
- .cursor/rules/codeguard-1-hardcoded-credentials.mdcCursor rule
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
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.

