Log levels are used appropriately
Why it matters
CWE-779 (Logging of Excessive Data) and CWE-778 (Insufficient Logging) sit at opposite ends of the same failure: logging everything at one level either floods your log store with noise or misses the signal entirely. OWASP A09 and NIST AU-2 both require that logged events carry enough severity context to support triage. When error level is used for informational messages or info is used for caught exceptions, alerting rules misfires — high-severity issues never trigger a page, and on-call engineers chase false alarms. The business impact is delayed incident response: teams lose the ability to distinguish a 500-rate spike from routine debug output.
Severity rationale
Medium because miscategorized log levels degrade alert fidelity without directly exposing data, but they predictably delay incident detection and response.
Remediation
Audit your catch blocks and log call sites and apply consistent level semantics: error for failures that require attention, warn for recoverable anomalies, info for significant business events, debug for diagnostic detail.
try {
await processPayment(userId)
logger.info({ userId, event: 'payment.success' }, 'Payment processed')
} catch (err) {
logger.error({ err, userId }, 'Payment processing failed') // error — not info
}
Search for logger.info inside catch blocks across app/api/ and lib/ — those are the most common miscategorizations. Set up a Sentry alert rule on error-level log volume so you notice when the rate changes.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Logging & Monitoring Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-779 — Logging of Excessive Data
- cwe · CWE-778 — Insufficient Logging
- owasp:2021 · A09 — Security Logging and Monitoring Failures
- nist:rev5 · AU-2 — Event Logging
- soc2:2017 · CC7.2 — Monitoring for anomalous system activity
Taxons
History
- 2026-04-18·v1.0.0·Initial import from saas-logging·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC7.2) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2