Automated summary
This skill checks that logging code records security-relevant events, never leaks secrets or PII into log output, and neutralizes CRLF injection through user-supplied input.
Strengths
- Maps to OWASP A09:2025 with five concrete, verifiable properties for each security decision point.
- Enforces redaction at the logger level rather than at every call site, preventing leaks from forgotten callers.
- Flags that fields that 'look safe', like usernames and dedicated actor identifiers, still need newline stripping.
- Requires structured key/value records with an event-type identifier and a non-null actor identifier that a SIEM can parse.
Limitations
- Describes principles only and ships no implementation, so translating them to a specific logging framework is left to the agent.
- No automated detection is bundled — no script, lint rule, or SAST query — it is review guidance, not a scanner.
- Does not cover retention, centralized aggregation, or alerting, which are part of the same OWASP risk category.
Reach for it when writing or reviewing logging code, audit trails, error handlers, or authentication event recording.
Skip it if you need to audit log-pipeline configuration or build a monitoring platform, since it only addresses application code.
Security analysis
SafeThe skill is a static security review guideline for logging practices. It contains no executable commands, destructive actions, data exfiltration, or obfuscated payloads. It does not declare or use any tools. The content only instructs analysis and code review, posing no execution risk.
No concerns found
How this analysis is madeExamples
Review this login handler for security logging failures: check whether both success and failure paths emit a log record, and make sure the password and token never appear as logged values.Our audit log does `logger.info(f"login attempt by {username}")`. Rewrite this as a structured record with an event type and actor, and strip CRLF from the username before it reaches the sink.This error handler dumps the full request body and response into the log. Identify the PII and token exposure and propose a redaction approach at the logger level.name: logging-failures description: Detects missing security event logs, logged secrets, and log injection through user input. Use when writing logging code, audit trails, error handlers that log, authentication event recording, or any code that writes security- relevant events. Also invoke when logging user inputs, API responses, or system actions that touch sensitive data.
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
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/security-logging-and-monitoring-failures-check-mrx3xwn9/download' --output '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md.part' && mv '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md.part' '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && test -s '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/logging-failures' && cp -R '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9' '.claude/skills/logging-failures'Cursor
test -f '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && test -s '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/logging-failures' && cp -R '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9' '.cursor/skills/logging-failures'Codex
test -f '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && test -s '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/logging-failures' && cp -R '.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9' '.agents/skills/logging-failures'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9'openskills read 'security-logging-and-monitoring-failures-check-mrx3xwn9'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/security-logging-and-monitoring-failures-check-mrx3xwn9/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
DeFi AMM Security
Security
Security checklist for Solidity AMM contracts, liquidity pools, and swap flows. Covers reentrancy, donation attacks, oracle manipulation, slippage, and integer math.
Semgrep Rule Creator
Security
Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Includes test-first methodology, taint mode support, and validation steps. Helps when building targeted static analysis detections.
Dev Toolbar Review Guide
Security
Safety rules for the dev toolbar, PostHog client, and feature flags. Use when reviewing changes to dev-tools and related files, covering environment guards, override cookies, and SSE stream safety.