fetch_ml/tests/unit
Jeremie Fraeys 58c1a5fa58
feat(audit): Tamper-evident audit chain verification system
Add ChainVerifier for cryptographic audit log verification:
- VerifyLogFile(): Validates entire audit chain integrity
- Detects tampering at specific event index (FirstTampered)
- Returns chain root hash for external verification
- GetChainRootHash(): Standalone hash computation
- VerifyAndAlert(): Boolean tampering detection with logging

Add audit-verifier CLI tool:
- Standalone binary for audit chain verification
- Takes log path argument and reports tampering

Update audit logger for chain integrity:
- Each event includes sequence number and hash chain
- SHA-256 linking: hash_n = SHA-256(prev_hash || event_n)
- Tamper detection through hash chain validation

Add comprehensive test coverage:
- Empty log handling
- Valid chain verification
- Tampering detection with modification
- Root hash consistency
- Alert mechanism tests

Part of: V.7 audit verification from security plan
2026-02-23 19:43:50 -05:00
..
api test: Update duplicate detection tests 2026-02-23 14:14:21 -05:00
audit feat(audit): Tamper-evident audit chain verification system 2026-02-23 19:43:50 -05:00
auth test(auth): skip keychain tests when dbus unavailable 2026-02-21 21:20:03 -05:00
config fix: resolve TODOs and standardize tests 2026-02-19 15:34:59 -05:00
container refactor(worker): update worker tests and native bridge 2026-02-23 18:04:22 -05:00
deployments chore(build): update build system, scripts, and additional tests 2026-02-12 12:05:55 -05:00
envpool test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
errors Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
experiment test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
gpu feat: GPU detection transparency and artifact scanner improvements 2026-02-23 12:29:34 -05:00
jupyter cleanup: Remove obsolete ws_jupyter_errorcode_test.go 2026-02-17 13:45:01 -05:00
logging Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
manifest chore(build): update build system, scripts, and additional tests 2026-02-12 12:05:55 -05:00
metrics test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
middleware test: Reorganize and add unit tests 2026-02-18 21:28:13 -05:00
network Fix multi-user authentication and clean up debug code 2025-12-06 12:35:32 -05:00
privacy test: Reorganize and add unit tests 2026-02-18 21:28:13 -05:00
queue fix: resolve TODOs and standardize tests 2026-02-19 15:34:59 -05:00
resources test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
security feat(audit): Tamper-evident audit chain verification system 2026-02-23 19:43:50 -05:00
storage test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
telemetry test: implement comprehensive test suite with multiple test types 2025-12-04 16:55:13 -05:00
worker feat(security): Artifact ingestion caps enforcement 2026-02-23 19:43:28 -05:00
simple_test.go test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00
worker_trust_test.go test: expand unit/integration/e2e coverage for new worker/api behavior 2026-01-05 12:31:36 -05:00