Skip to content

Privacy: add retention and cleanup for scheduled debug exports #642

Closed

Description

@tigercraft4

Summary

Scheduled debug exports can accumulate sensitive diagnostic files without an obvious retention policy or cleanup control. Android writes dated log/raw files under cache/logs; Apple writes scheduled logs under Documents, which is visible through Files when file sharing is enabled.

Why this matters

The scheduled export feature is useful for intermittent overnight bugs, but its output can include strap logs and, on some paths, raw biometric captures. These files should have bounded local retention so users do not unknowingly keep old diagnostic material indefinitely.

Evidence

  • android/app/src/main/java/com/noop/ui/DebugExportScheduler.kt:13 describes a daily scheduled debug export.
  • android/app/src/main/java/com/noop/ui/LogExport.kt:121 writes scheduled exports to the app-private export dir.
  • android/app/src/main/java/com/noop/ui/LogExport.kt:142 copies raw 5/MG capture content alongside the scheduled log when present.
  • Strand/System/ScheduledDebugExport.swift:154 writes scheduled logs to Documents/noop-strap-log-....
  • Strand/System/ScheduledDebugExport.swift:175 can copy the supplied raw capture to Documents/noop-raw-capture-....
  • project.yml:270 enables iOS file sharing / opening documents in place, making the Documents folder user-visible.

Suggested fix

  • Add a retention limit for scheduled debug exports, similar to BackupSync keep-count behavior.
  • Provide a visible “Delete debug exports” / “Clear scheduled exports” action.
  • Consider keeping raw capture out of scheduled unattended drops unless the user explicitly enables a separate raw-capture retention setting.
  • Document where these files live and how long they are kept.

Acceptance criteria

  • Scheduled debug export files are pruned to a bounded count or age on both Android and Apple targets.
  • Users can manually clear existing scheduled debug exports from Settings/Test Centre.
  • Tests cover prune selection and ensure unrelated cache/Documents files are not deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions