feat(core): platform layer, portable database, archives and access (refs #7 #8 #9 #10 #11)

Phase 1 foundations in the Anubis library:
- Platform: startup configuration from environment variables (Docker) or
  config.toml (desktop, in-house TOML subset), data folder layout, secret key
  custody (ANUBIS_SECRET_KEY, DPAPI on Windows, restricted file elsewhere),
  installation identity and database fingerprint.
- Db: ADO.NET with Npgsql and Microsoft.Data.Sqlite, money as NUMERIC(38,18)
  or canonical text rounded to 18 decimals, UTC moments, UUIDv7 ids; numbered
  SQL migrations with type tokens and a version table; engine-independent
  export/import with count and accounting-total checks; backups keeping 14.
- Core: injectable clock, channel event bus, scheduler with fixed, interval
  and market-relative times, settings with change log, AES-GCM secrets, log
  redaction, Italian formats.
- Access: PBKDF2-SHA512 hashes, RFC 6238 TOTP, hashed session tokens,
  sign-in attempt limit.

SQLitePCLRaw (Apache-2.0) arrives with Microsoft.Data.Sqlite and is declared
in DependencyPolicyTests and API-NOTES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 11:09:42 +01:00
1 parent ffb67c9135
commit 53ca01b7c3
44 files changed
+5644 -12

No files matched your search

+6 -1
View File
@@ -53,6 +53,11 @@ public sealed partial class SecretScanTests
Assert.IsFalse(LooksLikeSecret("REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}"));
Assert.IsFalse(LooksLikeSecret("private const string SecretKeyVariable = \"ANUBIS_SECRET_KEY\";"));
Assert.IsFalse(LooksLikeSecret("OKX_API_PASSPHRASE=<passphrase-123>"));
// Code that assigns a computed value is not a secret.
Assert.IsFalse(LooksLikeSecret("var key = RandomNumberGenerator.GetBytes(32);"));
Assert.IsFalse(LooksLikeSecret("builder.Password = Uri.UnescapeDataString(userInfo[1]);"));
Assert.IsFalse(LooksLikeSecret("?secret={Base32.Encode(secret)}&issuer=x"));
}
private static bool LooksLikeSecret(string line) =>
@@ -80,6 +85,6 @@ public sealed partial class SecretScanTests
// Variables named like the project's secrets (…KEY, …SECRET, …TOKEN, …PASSPHRASE, …PASSWORD) with a value
// of at least 8 characters that mixes letters and digits, as real keys and passwords do.
[GeneratedRegex("""(?i)[A-Za-z0-9_\-]*(key|secret|token|passphrase|password)["']?\s*[:=]\s*["']?(?<value>(?=[^\s"',;#]*\d)(?=[^\s"',;#]*[A-Za-z])[^\s"',;#]{8,})""")]
[GeneratedRegex("""(?i)[A-Za-z0-9_\-]*(key|secret|token|passphrase|password)["']?\s*[:=]\s*["']?(?<value>(?=[^\s"',;#]*\d)(?=[^\s"',;#]*[A-Za-z])[^\s"',;#(){}\[\]<>]{8,})(?=$|[\s"',;#])""")]
private static partial Regex NamedSecret();
}