Skip to content

Captured screenshots accumulate forever, including full-screen PNGs from find_text secret scans #209

Closed

Description

@TMHSDigital

Why it matters

find_text is advertised for finding secrets (sk-, ghp_, api key patterns), but every live call first saves a full-screen PNG that holds the secret in plain view, and nothing ever deletes it. Over weeks, ~/.screencast-mcp becomes a large, unencrypted archive of the user's screen.

Evidence

  • src/tools/findText.ts:76 writes live OCR captures to ~/.screencast-mcp/screenshots.
  • src/tools/waitForChange.ts:133 (keeping images is on by default) and src/tools/screenDiff.ts:68 (into frames/) do the same.
  • pruneRecords trims registry entries only, not files.
  • .events.raw can be left next to user-chosen outputs (src/utils/events.ts:315-319).

Suggested approach

  • Write OCR, wait and diff captures to the temporary work dir and delete them after the call, unless the caller passes keep: true.
  • Add a SCREENCAST_RETENTION_DAYS setting (and a cleanup tool, or cleanup at startup) that deletes old screenshots, frames and orphaned raw event files.
  • Document where captures live and how to clear them.

Done when

  • A live find_text call leaves no file behind by default.
  • Retention is configurable and documented in the README env table.

Activity

  1. added
    enhancement
    effort: small
    impact: medium
    privacy
    on Oct 25, 2026
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

    effort: smallenhancementimpact: mediumpriority: mediumprivacy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions