Skip to content

Add GDPR right-to-erasure flow honoring legal-hold and crypto-shred fallback #453

Description

@thlpkee20-wq

Description

Implement right-to-erasure that hard-deletes user data where lawful and crypto-shreds where retention is mandated by financial regulation. Must honor active legal holds.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/db/repositories/userRepository.ts, src/security/audit.ts
  • Legal hold must block erasure with explicit reason

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/gdpr-erasure
  • Implement changes
    • Add erasure_requests and legal_holds tables
    • Implement worker that deletes or crypto-shreds
    • Emit audit log with category and outcome
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • npm test
  • Cover edge cases
    • Hold added mid-flow, partial child-record retention, double request
  • Include test output and notes

Example commit message

feat: GDPR erasure with legal-hold and crypto-shred

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions