본문으로 건너뛰기
cccskills
무료GitHub에 공개

audit-log

Immutable audit log design: event schema, storage, retention, PII redaction, compliance, query patterns.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)
연동 도구PostgreSQL

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Audit Log — Immutable Action Registry

Append-only record of sensitive actions for legal, forensic, and compliance purposes. NOT operational logging (use structured logs/observability for that).

When to Audit

  • Auth: login, logout, login_failed, MFA challenge
  • Permissions: role_change, impersonate_start/stop
  • Sensitive CRUD: user data, grades, enrollments
  • Data exports: DSAR requests, bulk exports
  • Config/integrations: tenant settings, enable/disable
  • Deletion: user delete, record purge

Event Schema

Core fields: id (UUID, never auto-increment), ts (TIMESTAMPTZ), tenant_id, actor_type (user/system/api/service), actor_id, action (enum), target_type, target_id, before/after (JSONB, PII-redacted), ip, user_agent, request_id (log correlation), result (success/denied/error), metadata (JSONB). Optional tamper-evidence: prev_hash, hash.

Storage Decisions

  • Where: Same PostgreSQL, partitioned by month. Indexes on (tenant_id, ts), (tenant_id, actor_id, ts), (tenant_id, action, ts), (tenant_id, target_type, target_id, ts)
  • Immutability: REVOKE UPDATE/DELETE from app role + defensive trigger
  • Write pattern: Transactional outbox — insert in same tx as business op, worker moves to audit table. Avoids fire-and-forget losing events if tx commits but queue push fails

Retention: Hot (PostgreSQL, 0-3 mo) → Warm (BigQuery/S3 Parquet, 3-12 mo) → Cold (Glacier/Archive, 1-5 yr) → Purge (>5 yr, auto-delete + audit the purge). Monthly job drops partitions after warm export.

Query Patterns

  • GET /admin/audit with RBAC (admin, security, legal only)
  • Required: tenant_id filter (never trust frontend). Optional: actor_id, action, target, date range, result
  • Cursor pagination on (ts, id) DESC — never OFFSET
  • CSV export rate-limited; export action is itself audited

PII Redaction

Never persist: password, tokens, api_key, secrets, auth headers, cookies, sessions, full national ID, minor's email/phone, biometric data. Allowed: last 4 digits of ID, SHA256 of email, internal IDs. Replace sensitive fields with "***REDACTED***" preserving the key.

Compliance

  • GDPR/LGPD erasure vs retention: audit records exempt under legitimate interest, but redact PII — keep action record, remove identifying details
  • Minor data (LATAM): access to minor data is a critical auditable event
  • Tamper-evidence: hash chain per tenant only if legal requirement exists (adds write contention)

Anti-patterns

  • Mixing audit with operational logs (different SLAs, sensitivity, retention)
  • Allowing UPDATE/DELETE on audit table from app role
  • Logging passwords, tokens, or minor PII in cleartext
  • Missing tenant_id (cross-tenant leak = critical incident)
  • Synchronous audit blocking requests without outbox
  • No retention policy (unbounded cost + legal risk)
  • Exposing query endpoint without RBAC
  • No alert when write rate drops to zero (forensic blindness)

Checklist

  • Partitioned audit table with tenant-scoped indexes
  • REVOKE UPDATE/DELETE + defensive trigger
  • Transactional outbox pattern
  • Middleware captures context automatically (IP, UA, request_id, actor, tenant)
  • PII redactor with deny-list
  • Action catalog documented
  • Admin endpoint with RBAC, filters, cursor pagination
  • Archival job (hot → warm → cold)
  • Alert on zero write rate

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고