Skip to content

fix(audit): add missing @audited decorator to api_update_memory#2798

Open
handnewb wants to merge 1 commit into
vectorize-io:mainfrom
handnewb:fix/update-memory-missing-audit
Open

fix(audit): add missing @audited decorator to api_update_memory#2798
handnewb wants to merge 1 commit into
vectorize-io:mainfrom
handnewb:fix/update-memory-missing-audit

Conversation

@handnewb

Copy link
Copy Markdown
Contributor

Summary

The PATCH /v1/default/banks/{bank_id}/memories/{memory_id} endpoint (curate/invalidate/revert) was the only data-mutation endpoint without an audit trail. All other mutation endpoints have @audited:

  • delete_memory@audited("delete_memory")
  • update_document@audited("update_document")
  • delete_document@audited("delete_document")
  • create_mental_model@audited("create_mental_model")
  • update_memory → ❌ (missing)

Changes

  • Added @audited("update_memory") decorator to api_update_memory

Verification

  • Decorator is placed after @app.patch(...) and before async def, matching the pattern of all other audited endpoints
  • Memory curation operations are now recorded in the audit log for forensic traceability

Found during cybersecurity audit.

The PATCH /memories/{memory_id} endpoint (curate/invalidate/revert)
was the only data-mutation endpoint without an audit trail. All other
mutation endpoints (delete_memory, update_document, delete_document,
create_mental_model, etc.) have @Audited decorators.

This ensures memory curation operations are recorded in the audit log
for compliance and forensic traceability.

Found during cybersecurity audit.
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