test: add tests for AuditLogService #5
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-mcp#5
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
AuditLogService(src/Mcp/Services/AuditLogService.php) lacks unit tests for its critical security functionality.What needs testing
record()— audit log entry creation with hash chainverifyChain()— tamper detection via hash chain verificationexport()/exportToCsv()/exportToJson()— export with integrity attestationgetStats()— audit statistics aggregationregisterSensitiveTool()/unregisterSensitiveTool()— sensitive tool managementgetSensitiveTools()— list retrievalrequiresConsent()— consent gate for sensitive operationsNotes
This is a critical security service — test coverage is essential before production deployment.
Files
src/Mcp/Services/AuditLogService.phpsrc/Mcp/Models/McpAuditLog.phpsrc/Mcp/Tests/Unit/AuditLogServiceTest.php(to be created)