Skip to content

feat: initial v0.1 scaffold - #1

Merged
Taure merged 1 commit into
mainfrom
feat/initial-scaffold
May 20, 2026
Merged

feat: initial v0.1 scaffold#1
Taure merged 1 commit into
mainfrom
feat/initial-scaffold

Conversation

@Taure

@Taure Taure commented May 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Initial v0.1 scaffold of nova_audit — append-only audit-event log for the Nova ecosystem. Compounds the DORA / NIS2 / GDPR / AI Act compliance story without locking into any single framework.

Public API

  • nova_audit:log/2 — sync write
  • nova_audit:log_async/2 — async via Shigoto if loaded, per-log worker otherwise
  • nova_audit:query/2,3 — cursor-paginated, 8 filter keys

Layout

Umbrella: apps/nova_audit (core) + apps/nova_audit_kura (Postgres adapter as separate OTP app).

Adapters

  • nova_audit_log — OTP logger (write-only)
  • nova_audit_kura — Postgres via Kura; ships hardening_sql/0,1 + schema_sql/0

Guardian-flagged additions implemented

  1. event_id (UUIDv7 via jhn_uuid) — library-assigned
  2. schema_version (1) — library-assigned
  3. occurred_at — microseconds
  4. Filter additions: target_id, target_type, request_id
  5. Async overflow: bounded queue, drop-newest via process_info(message_queue_len), [nova_audit, overflow] telemetry, in-flight loss documented
  6. Write-time redaction only; query-time access control is consumer's job
  7. Append-only enforcement: API contract + nova_audit_kura:hardening_sql/0 for operator to REVOKE UPDATE/DELETE post-migration
  8. Kura adapter in-tree as separate OTP app

Test plan

  • rebar3 compile clean
  • rebar3 ct — 11/11 pass
  • rebar3 dialyzer clean
  • rebar3 xref clean
  • rebar3 hank clean
  • rebar3 fmt --check clean
  • Flip Dependency graph toggle at Settings → Security
  • CI green
  • Release tags v0.1.0

Follow-ups (not in v0.1)

  • nova_audit_storage adapter (uses nova_storage for object-store-backed logs)
  • Chain-hashed tamper-evidence (likely separate nova_audit_signed wrapper)
  • Retention helpers (likely separate nova_audit_retention library or Sentinel/Prova-owned)
  • Streaming query for very large windows

Public API: log/2 (sync), log_async/2, query/2,3. Append-only by API
contract: no update or delete. nova_audit_event:build/1 auto-assigns
event_id (UUIDv7 via jhn_uuid), schema_version (1), occurred_at
(microseconds). Required fields: actor + action; everything else optional.
Per-log redactor applied at write-time only.

Umbrella layout with apps/nova_audit (core) and apps/nova_audit_kura
(Kura/Postgres adapter as a separate OTP app). Logger adapter ships in
core for dev / no-DB deployments.

Async dispatch checks code:is_loaded(shigoto) at runtime: routes through
Shigoto if available, otherwise through the per-log nova_audit_worker
gen_server. Worker is bounded (default 10_000), drop-newest semantics via
process_info(WorkerPid, message_queue_len) check at enqueue time. Drops
emit [nova_audit, overflow] telemetry. In-flight loss on crash documented.

nova_audit_kura ships hardening_sql/0,1 returning REVOKE UPDATE, DELETE
statements for the operator to apply post-migration. schema_sql/0
provides the recommended table shape (UUID PK, indexes on occurred_at,
actor_id, action, target_id, request_id).

Telemetry events for log + query (start/stop/exception), overflow, and
write_error. Eight query filter keys: actor_id, action, occurred_after,
occurred_before, outcome, target_id, target_type, request_id.

Taure/erlang-ci v2 CI + release workflows, ex_doc guides for
getting-started, adapters, compliance notes (DORA/NIS2/GDPR/AI Act
mapping), and telemetry.
@github-actions

Copy link
Copy Markdown
ℹ️ 15 OTP CVEs auto-ignored (already fixed in running version)

These CVEs are patched in the installed OTP version but NVD data
has not been updated to reflect this. They are excluded from the
scan via an auto-generated .trivyignore.

CVE Details
CVE-2026-32147 Fixed in 28.4.3, running 28.5 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in SFTP chroot
CVE-2026-28808 Fixed in 28.4.2, running 28.5 — ScriptAlias CGI targets bypass directory auth (mod_auth vs mod_cgi path mismatch)
CVE-2026-32144 Fixed in 28.4.2, running 28.5 — OCSP designated-responder authorization bypass — missing signature verification (RFC 6960 §4.2.2.2)
CVE-2026-28810 Fixed in 28.4.2, running 28.5 — Predictable DNS Transaction IDs Enable Cache Poisoning in Built-in Resolver
CVE-2026-23943 Fixed in 28.4.1, running 28.5 — Pre-auth SSH DoS via unbounded zlib inflate
CVE-2026-23942 Fixed in 28.4.1, running 28.5 — SFTP root escape via component-agnostic prefix check in ssh_sftpd
CVE-2026-23941 Fixed in 28.4.1, running 28.5 — Request smuggling via first-wins Content-Length parsing in inets httpd
CVE-2026-21620 Fixed in 28.3.2, running 28.5 — TFTP Path Traversal
CVE-2016-1000107 Fixed in 28.0.4, running 28.5 — Httpd CGI Scripts Environment Variable Pollution AKA "httpoxy"
CVE-2025-58050 Fixed in 28.0.3, running 28.5 — Buffer Read Overflow on Regular Expressions with (*scs:) and (*ACCEPT)
CVE-2025-48038 Fixed in 28.0.3, running 28.5 — SSH Unverified File Handles can Cause Excessive Use of System Resources
CVE-2025-48039 Fixed in 28.0.3, running 28.5 — SSH Unverified Paths can Cause Excessive Use of System Resources
CVE-2025-48040 Fixed in 28.0.3, running 28.5 — SSH Malicious Key Exchange Messages may Lead to Excessive Resource Consumption
CVE-2025-48041 Fixed in 28.0.3, running 28.5 — SSH_FXP_OPENDIR may Lead to Exhaustion of File Handles
CVE-2025-4748 Fixed in 28.0.1, running 28.5 — Absolute Path in Zip Module

@Taure
Taure merged commit 20b2b91 into main May 20, 2026
31 of 32 checks passed
@Taure
Taure deleted the feat/initial-scaffold branch May 20, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant