You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For SOC 2 / ISO 27001 / HIPAA compliance, an observability daemon needs an audit log: every privileged action it took, who triggered it, and when. Kerno today logs operational stuff (load, error, debug) but not auditable events. Compliance reviewers will flag this.
Goal
A separate, append-only audit log stream emitting structured records for every:
Config change: file path, fields that changed, before / after values, source (file vs SIGHUP), user (uid)
AI call: provider, model, tokens used, prompt size, response size, redaction summary (how many PIDs/IPs/paths were stripped per privacy mode), no actual prompt/response bodies (privacy)
Finding emission to a sink: rule, severity, target sink (Slack, PagerDuty), payload hash (for traceability without leaking PII)
Every event listed above produces an audit record (verify by exercising each path in a test)
No PII leaks in audit records (PIDs/IPs/paths redacted per the configured privacy mode)
JSON schema is documented in `docs/audit-schema.md` and versioned
File output rotates cleanly (use `lumberjack` or expect logrotate; document)
Compliance reviewer can trace a finding from sink emission back to the cycle, the AI call, and the underlying signals
Why this matters
Some buyers will not deploy without this. Adding it now (when the codebase is small) is cheap. Adding it later (when 30 callers need to be retrofitted) is expensive.
Effort
~3 days including the redaction formalization and the doc.
Problem
For SOC 2 / ISO 27001 / HIPAA compliance, an observability daemon needs an audit log: every privileged action it took, who triggered it, and when. Kerno today logs operational stuff (load, error, debug) but not auditable events. Compliance reviewers will flag this.
Goal
A separate, append-only audit log stream emitting structured records for every:
/metricsendpoint (bearer token + optional mTLS) #41), mTLS verification failureOutput formats:
Schema (NDJSON):
```json
{
"ts": "2026-05-10T14:32:01.123Z",
"type": "ai.call",
"actor": "kerno/start",
"details": {
"provider": "anthropic",
"model": "claude-sonnet-4-…",
"tokens": 412,
"redactions": {"pid": 3, "ip": 1, "path": 0},
"duration_ms": 854
}
}
{
"ts": "2026-05-10T14:32:05.000Z",
"type": "config.reload",
"actor": "SIGHUP",
"details": {
"path": "/etc/kerno/config.yaml",
"changed_fields": ["log_level", "doctor.thresholds.fsync_p99_critical_ns"],
"applied": 2,
"restart_required": 0
}
}
```
Files to add
Acceptance criteria
Why this matters
Some buyers will not deploy without this. Adding it now (when the codebase is small) is cheap. Adding it later (when 30 callers need to be retrofitted) is expensive.
Effort
~3 days including the redaction formalization and the doc.