security-logging

Implement security logging and input validation for audit and incident response.

10|Updated Oct 18, 2025
One-click install
npx skills add https://github.com/CsHeng/dot-claude --skill security-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-logging
Source: https://github.com/CsHeng/dot-claude/tree/main/skills/security-logging
Command: npx skills add https://github.com/CsHeng/dot-claude --skill security-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies security-focused logging and input validation standards to enable traceability and incident response across services.

Core Features & Use Cases

  • Credential Security: Guidance on secret handling, rotation, and auditing.
  • Input Validation: Patterns to detect and sanitize unsafe inputs.
  • Incident Readiness: Logging patterns that facilitate forensics and monitoring.

Quick Start

Integrate a standard security log pattern into your service startup to ensure consistent event logging.

Frequently Asked Questions about security-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement security logging for detecting and tracing security events?

Security logging captures structured records of security-relevant events—authentication attempts, input validation failures, credential access—enabling detection and forensic tracing. Implement standardized log patterns at service startup to ensure consistent event capture across your infrastructure.

What input validation patterns prevent SQL injection and XSS attacks?

Input validation detects and sanitizes unsafe patterns at system boundaries: SQL injection attempts, cross-site scripting payloads, and malformed requests. Apply validation rules to API requests, filename inputs, and credential fields to block known attack vectors before processing.

How do I set up structured logging for incident response and forensics?

Structured logging formats events with consistent fields—timestamps, user identity, action, result—making logs machine-parseable for automated monitoring and incident investigation. Log authentication, authorization decisions, and validation failures to trace security incidents end-to-end.

What's the best way to handle secrets and enforce credential security in logs?

Credential security involves detecting secrets in logs, rotating credentials, and auditing access without exposing sensitive values. Implement secret-detection and remediation practices to prevent credential leakage while maintaining audit trails for compliance.

Can I validate API requests and enforce rate limiting with security logging?

Yes. API request validation checks payload structure, enforces size limits, and detects malicious patterns; rate-limiting scaffolding prevents abuse. Combine validation with security logging to track rejected requests and limit-exceeded events for incident readiness.

Do I need to sanitize filenames and handle edge cases in input validation?

Yes. Filename sanitization removes path traversal sequences and unsafe characters; request-size checks prevent resource exhaustion. These edge-case protections, combined with structured logging, ensure comprehensive security coverage at all system boundaries.