rrezartprebreza/spring-boot-skills / skills/spring-boot-3/security-audit-logging
security-audit-logging
VerifiedUse when designing or reviewing security audit events, their redaction, durable storage, integrity, or failure policies in Spring Boot. General metrics and debugging logs belong to production observability rather than this security-event workflow.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.6 KB |
| agents/openai.yaml | config | 270 B |
| examples/bad-audit.md | markdown | 358 B |
| examples/good-audit.md | markdown | 567 B |
| templates/SecurityAuditRecord.java | other | 1.2 KB |
templates/SecurityAuditRecord.java
View on GitHubpackage com.example.securityaudit;
import java.time.Instant;
import java.util.Objects;
import java.util.UUID;
import java.util.regex.Pattern;
public record SecurityAuditRecord(
UUID eventId, Instant occurredAt, UUID actorId, UUID tenantId,
Action action, UUID targetId, Outcome outcome, String correlationId) {
public enum Action { AUTHENTICATION, DOCUMENT_READ, ROLE_CHANGE, DATA_EXPORT }
public enum Outcome { ATTEMPTED, DENIED, SUCCESS, FAILURE }
private static final Pattern CORRELATION_ID = Pattern.compile("[A-Za-z0-9._-]{1,64}");
public SecurityAuditRecord {
Objects.requireNonNull(eventId);
Objects.requireNonNull(occurredAt);
Objects.requireNonNull(action);
Objects.requireNonNull(outcome);
if (correlationId == null || !CORRELATION_ID.matcher(correlationId).matches()) {
throw new IllegalArgumentException("Invalid correlation ID");
}
// Nullable identities support unauthenticated attempts, not unverified caller claims.
if (outcome == Outcome.SUCCESS && (actorId == null || tenantId == null)) {
throw new IllegalArgumentException("Successful events require verified actor and tenant");
}
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |