audit-logging — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited audit-logging (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
The compliance backbone — every agent action gets a log entry, every significant decision gets a record.
| Standard | What we use |
|---|---|
| OCSF | Event class structure, severity levels |
| OpenTelemetry | trace_id / span_id for workflow correlation |
| ISO 27001:2022 A.8.15 | Mandatory fields: who, what, when, where |
Each log entry is one JSON object per line, appended to .compliance/audit.log. Full schema: skills/audit-logging/audit-event.schema.json.
{
"event_id": "uuid-v4",
"timestamp": "ISO 8601",
"trace_id": "hex-32",
"event_class": "tool_call | decision | data_access | error",
"activity": "read | write | classify | scan | block | approve",
"severity": "INFO | LOW | MEDIUM | HIGH | CRITICAL",
"outcome": "success | failure | blocked | deferred",
"summary": "Human-readable one-liner"
}Add only when relevant — keep log entries lean:
| Field | When to include |
|---|---|
span_id | Multi-step workflows (hex-16) |
parent_span_id | Nested operations |
agent_id | Multi-agent setups |
resource | File/field/API being accessed — include classification if known |
tool | Tool name + exit code for tool_call events |
decision | Required for event_class: "decision" — see ADR below |
metadata | Anything else worth preserving |
An audit event with event_class: "decision" and a decision block. Created when the agent:
"decision": {
"action": "block | approve | defer",
"reasoning": "Why this action was taken",
"policy_ref": "GDPR Art. 9 | NIS2 Art. 21(2)(h) | ...",
"human_override": false
}.compliance/audit.log (project root)audit-YYYY-MM-DD.log)| Entity type (NIS2) | Minimum | Recommended |
|---|---|---|
| Essential | 18 months | 24 months |
| Important | 6 months | 12 months |
| Voluntary | 3 months | 6 months |
When writing code, include structured logging for: auth events, authorization, data access, data modification, external API calls, errors, config changes, batch jobs. Use structured key-value pairs — never string interpolation. Never log secrets, PII, or session tokens.
For the full operations table, correct/wrong code examples per language, what-not-to-log rules, and language-specific logger recommendations, see references/logging-guide.md.
Follow this process every session:
trace_id (32-char hex). Use it for all events in this session.span_id (16-char hex) for each discrete operation.tool_call event with the tool name..compliance/audit.log.trace_id, request_id) where the framework supports it{"event_id":"a1b2c3d4-...","timestamp":"2026-03-13T10:15:00Z","trace_id":"abc123...","event_class":"tool_call","activity":"scan","severity":"INFO","outcome":"success","summary":"Scanned src/ for sensitive data patterns","tool":{"name":"data-sensitivity","exit_code":0}}{"event_id":"e5f6g7h8-...","timestamp":"2026-03-13T10:15:05Z","trace_id":"abc123...","event_class":"decision","activity":"block","severity":"HIGH","outcome":"blocked","summary":"Blocked commit containing BSN","resource":{"type":"file","id":"src/users.py","classification":"RESTRICTED"},"decision":{"action":"block","reasoning":"File contains plaintext BSN (national ID)","policy_ref":"GDPR Art. 87","human_override":false}}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.