AgentsConfigHelper / rules
Cursor rule2 starsChanged 3 months agoMITView on GitHub
Logging & monitoring (structured telemetry, redaction, integrity, detection & alerting)
We split this codeguard-0-logging.mdc into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 21
Ensure integrity: append‑only or WORM storage.
≈ “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: Logging & monitoring (structured telemetry, redaction, integrity, detection & alerting) globs: **/*.c,**/*.h,**/*.js,**/*.jsx,**/*.mjs,**/*.yaml,**/*.yml version: 1.0.1 --- rule_id: codeguard-0-logging ## Logging & Monitoring Produce structured, privacy‑aware telemetry that supports detection, response, and forensics without exposing secrets. ### What to Log - Authn/authz events; admin actions; config changes; sensitive data access; input validation failures; security errors. - Include correlation/request IDs, user/session IDs (non‑PII), source IP, user agent, timestamps (UTC, RFC3339). ### How to Log - Structured logs (JSON) with stable field names; avoid free‑form text for critical signals. - Sanitize all log inputs to prevent log injection (strip CR/LF/delimiters); validate data from other trust zones. - Redact/tokenize secrets and sensitive fields; never log credentials, tokens, recovery codes, or raw session IDs. - Ensure integrity: append‑only or WORM storage; tamper detection; centralized aggregation; access controls and retention policies. ### Detection & Alerting - Build alerts for auth anomalies (credential stuffing patterns, impossible travel), privilege changes, excessive failures, SSRF indicators, and data exfil patterns. - Tune thresholds; provide runbooks; ensure on‑call coverage; test alert flows. ### Storage & Protection - Isolate log storage (separate partition/database); strict file/directory permissions; store outside web‑accessible locations. - Synchronize time across systems; use secure protocols for transmission; implement tamper detection and monitoring. ### Privacy & Compliance - Maintain data inventory and classification; minimize personal data in logs; honor retention and deletion policies. - Provide mechanisms to trace and delete user‑linked log data where required by policy. ### Implementation Checklist - JSON logging enabled; log injection sanitization active; redaction filters active; correlation IDs on all requests. - Isolated log storage with tamper detection; centralized log pipeline with integrity protections; retention configured. - Security alerts defined and tested; dashboards and reports in place. ### Validation - Unit/integration tests assert presence/absence of key fields; redaction unit tests. - Periodic audits for secret/PII leakage; tabletop exercises for incident workflows.
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-additional-cryptography.mdcCursor rule
- .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-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.

