logging-monitoring-review
Assesses security logging and monitoring gaps: missing audit trails, log injection, sensitive data in logs and alert coverage. Use when docs describe authentication, authorization decisions, payments, exports, admin operations or other actions that must be auditable.
- License 许可
- MIT
- 所属仓库
- Eliyce/paqad-ai
- 最近更新
- 2026-11-13
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- logging-monitoring-review
- metadata
- { "cacheable": "false", "model_tier": "reasoning", "paqad-meta": "skill.meta.yaml", "output_format": "markdown" }
- description
- Assesses security logging and monitoring gaps: missing audit trails, log injection, sensitive data in logs and alert coverage. Use when docs describe authentication, authorization decisions, payments, exports, admin operations or other actions that must be auditable.
02 资源文件 7
- 参考文档agents/openai.yaml166 B
- 资产文件assets/event-checklist.txt712 B
- 资产文件assets/output.template.md340 B
- 参考文档references/logging-gaps-checklist.md4.5 KB
- 脚本scripts/lint-findings.sh1.0 KB
- 脚本scripts/scan-log-smells.sh1.3 KB
- 参考文档skill.meta.yaml389 B
03 SKILL.md 正文
What It Does
Reviews whether the application logs security-relevant events with sufficient context for incident detection and forensic analysis (and whether the logging itself is secure (no sensitive data in logs, no log injection surfaces). Maps to OWASP 2025 A09) Security Logging and Alerting Failures.
Use This When
When module docs describe authentication, authorization decisions, financial transactions, data exports, admin operations, or any high-value action that must be auditable for compliance or incident response.
Inputs
- Read module docs to identify which operations are high-value and must be audited.
- Read
references/logging-gaps-checklist.mdbefore evaluating each area. - Read logging configuration files (Laravel
config/logging.php, DjangoLOGGINGdict, Express winston/pino config) and test files.
Procedure
-
Authentication event logging: Check whether failed and successful login attempts are logged with IP address, timestamp, and username (not password). Check that password changes, MFA enrollment/removal, and session invalidations are also logged.
-
Authorization event logging: Check whether access denials (403 responses) are logged with the requested resource and caller identity. Check that privilege escalation attempts are detected and logged.
-
Data modification logging: For each create/update/delete operation on sensitive models (users, payments, permissions, audit records themselves), verify an audit log entry is written with actor identity. Financial transaction audit trails must be append-only and tamper-resistant.
-
Log integrity: Check whether logs can be tampered with by an application-level user (e.g., a normal user can delete their own activity logs). Check whether logs are stored on a separate system from the application server.
-
Log injection: Check whether user-supplied input is written directly into log strings without sanitization. An attacker controlling a username or message field can:
- Insert fake log entries by embedding newlines (
\n) in the input - Inject ANSI escape codes to corrupt terminal-based log viewers
- Corrupt structured JSON log format by embedding
}or"characters
- Insert fake log entries by embedding newlines (
-
Sensitive data in logs: Check log statements around authentication, payment, and data export endpoints. Look for: passwords, authentication tokens, credit card numbers, full PII (SSN, passport numbers), session IDs.
-
Alerting coverage: Check whether there is alerting configured for: repeated authentication failures from a single IP, admin operations outside business hours, unusual data export volumes, or security-relevant configuration changes.
Output Contract
- Match
assets/output.template.md: severity, WSTG id (WSTG-ERRH-02default), area fromassets/event-checklist.txt, Evidence:file:lineonly (never log content), Required action. - Output must pass
scripts/lint-findings.sh(exit 0).
Escalate / Stop Conditions
- Ask when logging configuration is not accessible in the project: cannot evaluate log destinations or levels.
- Warn when financial transaction records lack an append-only audit trail: this is typically a compliance requirement, not just a security best practice.
- Do not flag logging gaps for non-sensitive operations (e.g., a missing log for a public read endpoint is not a security finding).
Resources
references/logging-gaps-checklist.mdscripts/scan-log-smells.sh: pre-investigation grep for sensitive data and injection candidatesscripts/lint-findings.sh: enforces WSTG id + Evidence:file:line per findingassets/output.template.mdassets/event-checklist.txt: the 7-area walk required before drafting
04 同仓库更多 Skills
sample-skill
Sample bundled skill fixture
processing-invoices
Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.
processing-invoices
Turns a supplier invoice into one ledger line. Use when a supplier invoice arrives and needs booking.
understand-idea
Chat and Claude Code: Step 1 of the discover journey: clarifies the goal, who benefits, success and constraints into the idea block. Use when the journey directs it to step 1, not directly.
size-work
Chat and Claude Code: Suggest a size for a ticket from comparable finished work, as a labelled suggestion the team still owns. Use it when someone asks "how big is this?", "roughly how much work is ABC-12?", or wants a backlog item sized. It finds the team's sizing scale at first use, picks two to five of the closest finished tickets with links, and gives a size or range with the drivers behind it and a confidence of low, medium or high, lowered and explained when the area's documents are template text. Every result is labelled a suggested size, never a date or a commitment. It writes nothing into the size field unless the user says "set it", and it refuses to overwrite an existing size unless the user asks to replace it. Produces the sizing block of the record.
refine-ticket
Chat and Claude Code: Improve one or more existing tracker tickets without losing the author's intent. Use it when someone wants a ticket read, diagnosed and tidied up ("this ticket is vague", "fix up ABC-12", "split this, it's too big"). It reads each ticket in full and snapshots it with its last-updated time, says what is wrong with evidence, and proposes a field-by-field before and after change set limited to summary, description, labels, parent, links and new child tickets on a split. It writes nothing until an explicit "apply it" bound to that exact change set, re-checks the ticket for conflicting edits just before writing, never replaces rich descriptions with plain text, never deletes or closes a ticket, and reads each ticket back after applying. Produces the existing and changes blocks of the record.