{"audit_date":"2026-10-25","auditor":"AURICORE enterprise hardening pass (baseline forensics before source changes)","backward_compatibility_risks":["MVP CLI flag style (key-create, asset-list) differs from the enterprise grouped CLI (key create, key list); the enterprise CLI is the supported interface from 1.0.0 and the change is recorded in CHANGELOG.md.","MVP plaintext key files are NOT importable into the encrypted keystore by design (a plaintext private key on disk must be treated as compromised); owners should rotate to a new enterprise key and re-attest assets. Recorded in docs/operations/UPGRADE.md.","MVP SQLite databases migrate via scripts/migration/migrate_mvp.py into the 'default' tenant."],"baseline_verification":{"existing_capabilities":["Streamed SHA-256 file digest; deterministic canonical JSON (sorted keys, compact separators)","Ed25519 key generation and manifest signing via the cryptography library","ZIP-compatible .auri writer/reader with traversal, entry-count, size, and compression-ratio checks","One-byte tamper detection and traversal rejection tests","Append-only hash-linked event log files","SQLite registry (assets, audit) with INSERT OR REPLACE semantics","Typer CLI: init, key-create, refine, verify, inspect, asset-list, event-append, version","FastAPI: GET /v1/health/live, GET /v1/assets, POST /v1/verify (no auth)","BUILD_MANIFEST.json generation and --verify mode in the metabuilder"],"metabuilder_dry_run":{"exit_code":0,"result":"18 files planned"},"metabuilder_generate_and_verify":{"exit_code":0,"result":"18 written; --verify: verified=true, mismatches=[]"},"metabuilder_vs_checked_in":"Generated tree matches the checked-in MVP tree except .pytest_cache/__pycache__ created by the baseline test run. No content drift.","mvp_pytest":{"command":"PYTHONPATH=src python -m pytest tests -q","exit_code":0,"result":"2 passed"}},"copyright":"Copyright (c) 2026 Devin Benard Royal. All Rights Reserved.","findings":[{"category":"cryptographic","disposition":"FIXED — src/auricore/crypto_provider KeyStore; tests/unit/test_crypto.py::test_keystore_encrypted_at_rest, test_wrong_password_fails_closed","evidence":"src/auricore/crypto.py generate_key writes private_b64 unencrypted to ~/.auricore/keys/<name>.json (mode 0600 only).","id":"AURI-SEC-001","remediation":"Encrypted file keystore: Argon2id KDF + AES-256-GCM, public-only index, 0600/0700 permissions.","severity":"critical","title":"Private signing keys stored in plaintext JSON"},{"category":"api_security","disposition":"FIXED — src/auricore/api.py, identity, authorization; tests/api/test_api.py, tests/security/test_tokens_authz.py","evidence":"src/auricore/api.py exposes all routes without any principal, scope, or tenant check.","id":"AURI-SEC-002","remediation":"JWT validation (iss/aud/exp/nbf/alg allowlist), deny-by-default policy engine, tenant boundaries, step-up for sensitive actions.","severity":"critical","title":"Hosted API has no authentication or authorization"},{"category":"api_security","disposition":"FIXED — api.py middleware; payload cap returns 413 before body read","evidence":"api.py reads uploads unbounded by policy (1 MiB chunks but no total cap) and sets no headers.","id":"AURI-SEC-003","remediation":"Middleware: per-client/path token-bucket rate limit, content-length cap, secure headers, explicit CORS allowlist (disabled by default).","severity":"high","title":"No rate limiting, body limits, security headers, or CORS policy in the API"},{"category":"cryptographic","disposition":"FIXED — crypto_provider.SignatureEnvelope; container verifier resolves key status distinctly (REVOKED)","evidence":"MVP manifest signature block contains only suite, key_id, public_b64 (violates INV-007).","id":"AURI-CRYPTO-001","remediation":"SignatureEnvelope with suite, algorithm, key_id, key_version, payload_profile, canonicalization_profile, created_at; verification separates validity, key status, and trust.","severity":"high","title":"Signature record omits key version, payload profile, canonicalization profile, creation time, trust and revocation fields"},{"category":"cryptographic","disposition":"FIXED — crypto_provider, api keys routes; tests cover rotation and revoked signing refusal","evidence":"crypto.py exposes generate/load/sign/verify only.","id":"AURI-CRYPTO-002","remediation":"KeyStore.rotate/set_status with successor linking; API key rotate/revoke endpoints behind step-up authorization.","severity":"medium","title":"No key rotation, revocation, or compromise lifecycle"},{"category":"cryptographic","disposition":"FIXED as adapter boundary — PQ suites report UNSUPPORTED explicitly (no FIPS claim); tests/unit/test_crypto.py::test_pq_unsupported_explicit","evidence":"Single hardcoded ed25519-v1 suite.","id":"AURI-CRYPTO-003","remediation":"Provider registry with ML-DSA/SLH-DSA adapters that fail closed as UNSUPPORTED; CryptoPolicy migration policies.","severity":"medium","title":"No post-quantum agility boundary"},{"category":"data_integrity","disposition":"FIXED — storage.Repository; tests/integration/test_storage.py (conflict, rollback, idempotency, tenant isolation)","evidence":"store.py register() replaces asset rows and writes audit in the same implicit transaction without head checks; events are file-only.","id":"AURI-REL-001","remediation":"SQLAlchemy schema with unique constraints, transactional UnitOfWork, atomic event append + head CAS + outbox, idempotency records.","severity":"high","title":"Registry uses INSERT OR REPLACE and non-atomic audit writes; no event-head concurrency control"},{"category":"api_completeness","disposition":"FIXED — src/auricore/api.py","evidence":"api.py defines live/assets/verify only; no schemas beyond VerifyResponse, no pagination, no idempotency, no error envelope.","id":"AURI-API-001","remediation":"Full /v1 surface with Pydantic strict models, problem-style error envelope, correlation/request IDs, cursor pagination, Idempotency-Key, OpenAPI examples via models.","severity":"high","title":"API surface is 3 routes vs the blueprint contract (assets, events, licenses, keys, preservation, exports, recovery, audit, auth)"},{"category":"package_security","disposition":"FIXED — container._validate_infos/verify_package; tests/security/test_hostile_packages.py","evidence":"container.py _validate_zip checks only name safety, count, total size, ratio.","id":"AURI-SEC-004","remediation":"Reader rejects duplicates after canonicalization, symlink/device entries, per-entry size, unknown critical features (UNSUPPORTED), invalid metadata sizes.","severity":"high","title":"Package reader does not reject duplicate canonical paths, symlinks/special files, or unknown critical features"},{"category":"reliability","disposition":"FIXED — container._source_entries/refine/extract_package","evidence":"container.refine accepts one file; asset name embedded directly.","id":"AURI-REL-002","remediation":"Directory tree manifests with streamed digests, detached mode with external-artifact verification, quarantined extraction with atomic promotion.","severity":"medium","title":"Single files only: no directory refinement, no detached artifacts, no extraction quarantine"},{"category":"data_model","disposition":"FIXED — storage.ALL_TABLES, migrations/, scripts/migration/migrate_mvp.py; tests/migration","evidence":"store.py SCHEMA has only assets and audit tables.","id":"AURI-DATA-001","remediation":"21-table enterprise schema + Alembic migration 0001 + MVP database migration script.","severity":"medium","title":"Data model lacks tenants, subjects, keys, licenses, preservation runs, receipts, idempotency, recovery, jobs, outbox"},{"category":"deployment","disposition":"FIXED — deploy/, scripts/{recovery,build,release,security}","evidence":"No systemd/launchd units, container files, Kubernetes/Helm, env template, backup/restore or upgrade scripts.","id":"AURI-OPS-001","remediation":"deploy/ tree (native-first; containers optional), backup/restore scripts, runbooks.","severity":"medium","title":"No deployment assets beyond scripts/run_mvp.sh"},{"category":"observability","disposition":"FIXED — observability, audit, api routes","evidence":"No logging anywhere in the MVP; single /health/live route.","id":"AURI-OPS-002","remediation":"JSON logging with redaction, Prometheus /metrics, /v1/health/ready with DB check, hash-chained audit events.","severity":"medium","title":"No structured logging, metrics, health/readiness separation, or audit chain"},{"category":"testing","disposition":"FIXED — tests/ (see SECURITY_TEST_REPORT.json for executed counts)","evidence":"tests/test_mvp.py.","id":"AURI-TEST-001","remediation":"Full test program: unit, integration, API, conformance vectors, property, fuzz, security, migration, backup/restore, end-to-end, performance smoke, compatibility.","severity":"medium","title":"Test coverage: 2 tests (roundtrip/tamper, traversal) only"},{"category":"documentation","disposition":"FIXED — docs/ tree and root documents","evidence":"docs/ARCHITECTURE.md and docs/SECURITY.md only.","id":"AURI-DOC-001","remediation":"Complete documentation set incl. CONTROL_MATRIX (md+json), AURI_SPECIFICATION, CANONICALIZATION, threat model, key management, DR, commercialization.","severity":"low","title":"Documentation is README + 2 short docs; no threat model detail, control matrix, runbooks, ADRs, or specs"},{"category":"supply_chain","disposition":"FIXED — .github/workflows/ci.yml, scripts/security/generate_sbom.py, scripts/release/build_release.py","evidence":"pyproject ranges only; no .github/workflows, no SBOM tooling.","id":"AURI-SUPPLY-001","remediation":"Pinned ranges, CI workflow (format/lint/type/test/coverage/build/metabuilder-verify), SBOM generation script, release manifest + checksums + provenance.","severity":"medium","title":"Dependencies unpinned ranges without lock, no SBOM, no CI, no secret/vuln scanning configuration"},{"category":"commercialization","disposition":"FIXED — policy, entitlement, licensing","evidence":"No edition concept in the MVP.","id":"AURI-COMM-001","remediation":"Edition feature policy (security controls never edition-gated; offline verification always on), signed license evidence separated from entitlement, provider-neutral payment interface that never establishes ownership.","severity":"low","title":"No edition/entitlement scaffolding; no payment boundary"},{"category":"backward_compatibility","disposition":"FIXED — container._verify_legacy; tests/migration/test_migration.py::test_legacy_mvp_package_still_verifies","evidence":"MVP packages (schema 1.0, signatures/manifest.sig) would fail a v2-only reader.","id":"AURI-COMPAT-001","remediation":"Legacy verification path for schema 1.0 packages, tested with a package built using the original MVP algorithms.","severity":"medium","title":"Hardening must not orphan MVP packages"}],"input_artifacts":["AURICORE_Runnable_MVP_Scaffold.zip (auricore_mvp, 18 files + builder copy)","auricore_meta_builder.py (MVP generator, 18 embedded files)","AURICORE_Complete_Blueprint_API_Appendix_and_MetaBuilder_Prompt.pdf","AURICORE_Python3_MetaBuilder_Engineering_Prompt.txt","AURICORE__Enterprise_Production_Hardening_Prompt.md (supplied in chat by the owner)"]}