logging-failures
Identifies missing security logs, sensitive information leaks, and injection vulnerabilities in log statements.
Install
mkdir -p .claude/skills/logging-failures && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11990" && unzip -o skill.zip -d .claude/skills/logging-failures && rm skill.zipInstalls to .claude/skills/logging-failures
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Detects missing security event logs, logged secrets, and log injection throughKey capabilities
- →Detect missing security event logs
- →Identify logged credentials, tokens, or PII
- →Check for CRLF injection vulnerabilities in log entries
- →Ensure log records are structured key/value data
How it works
The skill analyzes logging code for patterns that indicate missing security logs, logged secrets, log injection risks, and unstructured log data, then suggests fixes.
Inputs & outputs
When to use logging-failures
- →Reviewing authentication audit trails
- →Fixing log injection vulnerabilities
- →Redacting secrets in log output
About this skill
Security Logging and Monitoring Failures Security Check (A09:2025)
What this checks
Protects the ability to detect and respond to attacks. Missing security event logs leave breaches undetected; logging sensitive fields creates new data-exposure vulnerabilities; CRLF injection lets attackers forge log entries.
Vulnerable patterns
- Log statement that interpolates a credential, token, or other secret as a value
- Authentication failure, authorization denial, or privileged action that exits without producing a log record
- Log call that dumps a full request body, response, or other payload containing PII or tokens
- User-controlled string interpolated into a log line without CRLF/newline stripping, allowing forged log entries
- Unstructured string logs that a SIEM cannot reliably parse or alert on
Fix immediately
Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties:
- Every security-relevant decision point emits exactly one log record. Authentication outcomes, authorization outcomes, privileged actions — no branch silently exits. A successful login and a failed login should both produce a record; a missing failure log is as bad as no logging at all.
- Credential-like fields never appear as values. Names like password, token, secret, authorization, api_key, session, credit_card, ssn are either omitted or redacted before the log call. Do this at the logger, not at every call site — a forgotten call site is a guaranteed leak.
- Every user-controlled string passes through a CRLF/newline stripping step before reaching the log sink — including fields that "look safe" like usernames, and including any dedicated actor/subject/user-id parameter. A username containing an embedded newline followed by a forged event prefix smuggles fake log lines whether it arrives as a positional argument or a keyword argument.
- Records are structured key/value data — not an interpolated message string. A SIEM should be able to read fields directly; a regex-parsed message string misses things attackers can exploit.
- Each record carries an event-type identifier and an actor identifier. The actor is a non-null field naming who or what triggered the event — a user id, session id, an explicit anonymous marker, or a system marker for server-initiated jobs. Never silently omitted.
Translate each principle to the logging framework and structured-logger conventions of the audited file's language. Use the framework's documented structured-event API — do not hand-build log lines from string interpolation.
Verification
Confirm these properties hold (language-agnostic):
- Every security-relevant decision point (authentication outcome, authorization outcome, privileged action) emits exactly one log record — no branch silently exits without logging
- Credential-like field names (password, token, secret, authorization, api_key, session) never appear as values in any log record — they are omitted or redacted before the log call
- Every user-controlled string reaching a log sink passes through a CRLF/newline stripping step — including fields that look safe like usernames, and including dedicated actor/subject/user-id parameters
- Log records are emitted as structured key/value data — not as a single interpolated message string that a SIEM would have to regex-parse
- Each record carries an event-type identifier and a non-null actor identifier (user id, session id, anonymous marker, or system marker for server-initiated jobs)
References
When not to use it
- →When the code does not involve logging security-relevant events
- →When the code does not log user inputs, API responses, or sensitive data
- →When the user wants to implement logging without security considerations
Limitations
- →Focuses on security logging failures (A09:2025)
- →Requires analysis of logging code and related data flows
- →Does not cover all possible security vulnerabilities
How it compares
This skill specifically audits logging code against security best practices (OWASP A09:2025) to prevent breaches and data exposure, unlike general code review.
Compared to similar skills
logging-failures side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| logging-failures (this skill) | 0 | 2mo | No flags | Intermediate |
| protocol-reverse-engineering | 9 | 6mo | Review | Advanced |
| equilateral-agents | 5 | 9mo | No flags | Intermediate |
| secops-triage | 4 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by thejefflarson
View all by thejefflarson →You might also like
protocol-reverse-engineering
wshobson
Master network protocol reverse engineering including packet analysis, protocol dissection, and custom protocol documentation. Use when analyzing network traffic, understanding proprietary protocols, or debugging network communication.
equilateral-agents
Equilateral-AI
22 production-ready AI agents with database-driven orchestration for security reviews, code quality analysis, deployment validation, infrastructure checks, and compliance. Auto-activates for security concerns, deployment tasks, code reviews, quality checks, and compliance questions. Includes upgrade paths to enterprise features (GDPR, HIPAA, multi-account AWS, ML-based optimization).
secops-triage
Expert guidance for security alert triage. Use this when the user asks to "triage" an alert or case.
netflows
BrownFineSecurity
Network flow extractor that analyzes pcap/pcapng files to identify outbound connections with automatic DNS hostname resolution. Use when you need to enumerate network destinations, identify what hosts a device communicates with, or map IP addresses to hostnames from packet captures.
azure-bgp
benchflow-ai
Analyze and resolve BGP oscillation and BGP route leaks in Azure Virtual WAN–style hub-and-spoke topologies (and similar cloud-managed BGP environments). Detect preference cycles, identify valley-free violations, and propose allowed policy-level mitigations while rejecting prohibited fixes.
secops-investigate
Expert guidance for deep security investigations. Use this when the user asks to "investigate" a case, entity, or incident.