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.
npx agentmods add rules/ivangrynenko/cursorrules/javascript-security-logging-monitoring-failuresgit clone --depth 1 https://github.com/ivangrynenko/cursorrulesWhat 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 | $0.00000 | $0.06053 |
| Opus 5 | $0.00000 | $0.03027 |
| Sonnet 5 | $0.00000 | $0.01211 |
| Haiku 4.5 | $0.00000 | $0.00605 |
Grade A, and why
javascript-security-logging-monitoring-failures 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 yesterday.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- javascript-security-logging-monitoring-failures — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 802 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JavaScript Security Logging and Monitoring Failures (OWASP A09:2021)
actions:
-
type: enforce conditions:
Pattern 1: Missing Error Logging
- pattern: "(?:try\s*{[^}]}\scatch\s*\([^)]\)\s{[^}]})(?|logger?\.(?:error|warn|log)|captureException))" message: "Error caught without proper logging. Implement structured error logging for security events."
Pattern 2: Sensitive Data in Logs
- pattern: "console\.(?:log|warn|error|info|debug)\s*\([^)](?:password|token|secret|key|credential|auth|jwt|session|cookie)" negative_pattern: "\\\|redact|mask|sanitize" message: "Potential sensitive data in logs. Ensure sensitive information is redacted before logging."
Pattern 3: Missing Authentication Logging
- pattern: "(?:login|signin|authenticate|auth)\s*\([^)]\)\s{[^}]}" negative_pattern: "(?:log|audit|record|track)\s\(" message: "Authentication function without logging. Log authentication attempts, successes, and failures."
Pattern 4: Missing Authorization Logging
- pattern: "(?:authorize|checkPermission|hasAccess|isAuthorized|can)\s*\([^)]\)\s{[^}]}" negative_pattern: "(?:log|audit|record|track)\s\(" message: "Authorization check without logging. Log access control decisions, especially denials."
Pattern 5: Insufficient Error Detail
- pattern: "(?:console\.error|logger?\.error)\s*\([^)](?:error|err|exception)\s\)" negative_pattern: "(?:error\.(?:message|stack|code|name)|JSON\.stringify\(error\)|serialize)" message: "Error logging with insufficient detail. Include error type, message, stack trace, and context."
Pattern 6: Missing Security Event Logging
- pattern: "(?:bruteForce|rateLimit|block|blacklist|suspicious|anomaly|threat|attack|intrusion|malicious)" negative_pattern: "(?:log|audit|record|track|monitor|alert|notify)" message: "Security event detection without logging. Implement logging for all security-relevant events."
Pattern 7: Inconsistent Log Formats
- pattern: "console\.(?:log|warn|error|info|debug)\s*\(" negative_pattern: "JSON\.stringify|structured|format" message: "Inconsistent log format. Use structured logging with consistent formats for easier analysis."
Pattern 8: Missing Log Correlation ID
- pattern: "(?:api|http|fetch|axios|request)\s*\([^)]*\)" negative_pattern: "(?:correlationId|requestId|traceId|spanId|context)" message: "API request without correlation ID. Include correlation IDs in logs for request tracing."
Pattern 9: Missing High-Value Transaction Logging
- pattern: "(?:payment|transaction|order|purchase|transfer|withdraw|deposit)\s*\([^)]*\)" negative_pattern: "(?:log|audit|record|track)" message: "High-value transaction without audit logging. Implement comprehensive logging for all transactions."
Pattern 10: Client-Side Logging Issues
- pattern: "(?:window\.onerror|window\.addEventListener\s*\(\s*['"]error['"])" negative_pattern: "(?:send|report|log|capture|track)" message: "Client-side error handler without reporting. Implement error reporting to backend services."
Pattern 11: Missing Log Levels
- pattern: "console\.log\s*\(" negative_pattern: "logger?\.(?:error|warn|info|debug|trace)" message: "Using console.log without proper log levels. Implement a logging library with appropriate log levels."
Pattern 12: Missing Monitoring Integration
- pattern: "package\.json" negative_pattern: "(?:sentry|newrelic|datadog|appinsights|loggly|splunk|elasticsearch|winston|bunyan|pino|loglevel)" file_pattern: "package\.json$" message: "No logging or monitoring dependencies detected. Consider adding a proper logging library and monitoring integration."
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.
- yesterday First seen · 802 lines · 6,053 tokens per session scan A 0ff60ffa6eb7
javascript-security-logging-monitoring-failures is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 6,053 tokens. 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-30.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.