Skip to content

Add Audit Trail Export for Compliance Documentation (SAR Filing, Regulatory Exams) #1032

@matheusybsen

Description

@matheusybsen

Problem:
When financial institutions use yente for sanctions/PEP screening, they need to document screening decisions for regulatory compliance, but yente currently doesn't provide audit trail export functionality for screening operations.

Compliance teams need to prove to regulators:

  • Which version of sanctions data was used for each screening
  • What entities were screened and when
  • What matches were found (including score and match logic)
  • Who performed the screening and what decision was made

Without audit trails, institutions cannot:

  • Complete SAR filings with required screening documentation
  • Pass regulatory exams (OCC, FDIC, FinCEN auditors request screening logs)
  • Respond to legal discovery requests
  • Demonstrate compliance program effectiveness

Solution:
Add audit trail export functionality to yente:

  1. Screening Log Capture:

    • Log all /match and /search API calls
    • Store: timestamp, query parameters, matched entities, scores, dataset versions
    • Include user/system identifier (if provided in request headers)
  2. Export Endpoint:

    • New endpoint: GET /audit/export
    • Query parameters: date range, entity type, dataset filter
    • Output formats: CSV (for Excel analysis), JSON (for downstream systems), PDF (for regulatory submission)
  3. Compliance Report Fields:

    • Screening timestamp
    • Query details (name, DOB, country, etc.)
    • Dataset version used (e.g., "OpenSanctions 2026-02-14")
    • Match results: entity ID, name, sanctions program, match score, match explanation (from logic-v2)
    • Decision outcome (if provided by caller via custom field)

Regulatory Drivers:

  • FinCEN SAR Requirements: Banks must document "description of suspicious activity" including screening results
  • OCC Heightened Standards (31 CFR 1010.610): Requires "recordkeeping and reporting" of sanctions screening
  • OFAC 50% Rule Compliance: Must document screening logic for ownership structures
  • EU 6AMLD: Requires audit trails of AML controls

Use Cases:

  • SAR Filing: Export screening evidence showing entity matched OFAC SDN list
  • Regulatory Exam: Provide auditors with 90-day screening log showing coverage
  • Internal Audit: Quarterly review of screening decisions and false positive rates
  • Legal Discovery: Respond to subpoenas requesting screening records

Implementation Notes:

  • Could leverage existing ElasticSearch infrastructure (yente already has audit logs for index operations per v5.1.0)
  • Privacy consideration: Allow filtering to exclude PII in exported logs (GDPR compliance)
  • Performance: Async export for large date ranges (return job ID, poll for completion)

Alternatives Considered:

  • Application-level logging: Capture API responses in calling application - but doesn't include dataset version metadata
  • Database query logs: Use ElasticSearch query logs - but lacks business context and user decisions
  • Manual documentation: Screenshot each match - not scalable, error-prone

I can help with:

  • Defining regulatory documentation requirements from FinCEN/OFAC/OCC guidance
  • Examples of compliant audit trail formats for SAR filing
  • Testing export functionality against real compliance workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestoperationsDeployment and maintenance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions