Skip to content

feat: Enhanced audit trail — hash chaining, verification, verwerkingsregister#985

Open
rubenvdlinde wants to merge 2 commits intodevelopmentfrom
fix/enhanced-audit-trail
Open

feat: Enhanced audit trail — hash chaining, verification, verwerkingsregister#985
rubenvdlinde wants to merge 2 commits intodevelopmentfrom
fix/enhanced-audit-trail

Conversation

@rubenvdlinde
Copy link
Contributor

Summary

Changes restored

  • lib/Service/AuditHashService.php — SHA-256 hash chain computation and verification
  • lib/Migration/Version1Date20260322100000.php — DB migration adding hash/previous_hash columns to audit trail
  • AuditTrail entity extended with hash and previousHash fields
  • AuditTrailMapper auto-chains hashes on insert
  • AuditTrailController immutability enforcement (HTTP 405 on PUT/DELETE)
  • Verification endpoint: GET /api/audit-trails/verify
  • Export endpoint: GET /api/audit-trails/export (JSON/CSV)
  • Verwerkingsregister and inzageverzoek endpoints
  • tests/Unit/Service/AuditHashServiceTest.php
  • OpenSpec: audit-hash-chain, verwerkingsregister-api, archived change directory

Context

This PR was previously merged as #954 and reverted in #968 while investigating a development branch issue. The revert was unrelated to this feature quality.

Quality

  • Pre-existing PHPCS violations in lib/Migration/Version1Date20250828120000.php fixed before re-applying
  • Full PHPCS run passes with 0 errors after all changes

Generated with Claude Code

@github-actions
Copy link
Contributor

Quality Report

Repository ConductionNL/openregister
Commit 0ee04eb
Branch 985/merge
Event pull_request
Generated 2026-03-24 11:21 UTC
Workflow Run https://github.com/ConductionNL/openregister/actions/runs/23486751517

Summary

Group Result
PHP Quality PASS
Vue Quality PASS
Security PASS
License PASS
PHPUnit SKIP
Newman SKIP
Playwright SKIP

PHP Quality

Tool Result
lint PASS
phpcs PASS
phpmd PASS
psalm PASS
phpstan PASS
phpmetrics PASS

Vue Quality

Tool Result
eslint PASS
stylelint PASS

Security

Ecosystem Result
composer PASS
npm PASS

License Compliance

Ecosystem Result
composer PASS
npm PASS

composer dependencies (147 total)

Metric Count
Approved (allowlist) 146
Approved (override) 1
Denied 0

npm dependencies (586 total)

Metric Count
Approved (allowlist) 585
Approved (override) 1
Denied 0

PHPUnit Tests

PHPUnit tests were not enabled for this run.

Integration Tests (Newman)

Newman integration tests were not enabled for this run.

E2E Tests (Playwright)

Playwright E2E tests were not enabled for this run.


Generated automatically by the Quality workflow.

Download the full PDF report from the workflow artifacts.

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