Skip to content

Redaction can silently under-cover: rotated input, size-dependent blur/pixelate strength, redact after zoom in pipeline, one-frame secret scan #204

Closed

Description

@TMHSDigital

Why it matters

Redaction is a privacy feature: users publish the result believing the secret is gone. Several paths produce output that looks redacted but is not, or is only weakly obscured, and none of them raise an error. Every case below is separate from #188 (tiny blur regions failing outright).

Evidence

  1. Rotation metadata is ignored. parseMediaInfo (src/utils/media.ts:51-67) reports stored width and height, but ffmpeg auto-rotates frames before filtering. A 320x240 clip with a 90° tag filters as 240x320. A redact box with x=200, w=64 passes the bounds check, but drawbox covers only 40 px. The same mismatch affects crop validation, get_media_info and pipeline planning.
  2. Strength scales with region size.
    • Blur radius is floor(min(w,h)/4) clamped to 2–20 (media.ts:649-651), so a 300x18 token line gets radius 4, which is often readable.
    • Pixelate always uses 16 cells across (media.ts:701), so a 64x16 secret becomes 4 px blocks, about 2 per character.
  3. Pipeline step order. Redact coordinates apply to the frame as it is at that step (src/utils/pipeline.ts:152-157). After zoom, which reframes over time while keeping the same frame size, or after a crop-mode reframe, the box passes validation but the content moves out from under it. Pipeline redaction also encodes at the pipeline quality setting, while standalone redact_region forces high quality (media.ts:728).
  4. The secret scan covers one frame. The bug-repro-clip prompt (src/prompts.ts:18) runs find_text at a single timestamp (src/tools/findText.ts:84) before telling the agent to redact and export_gif for an issue. A secret visible at any other moment ships, while the wording suggests the clip was checked.
  5. Test gap. The only pixel-level redaction test (src/__tests__/integration/ffmpeg.test.ts:429-435) checks box style, one region and frame 1. Blur, pixelate, time windows, multiple regions and pipeline redact are never checked on actual output pixels.

Suggested approach

  • Use display (post-rotation) dimensions everywhere: probe the side-data rotation and swap width and height.
  • Define minimum strengths: blur radius from a minimum absolute value (or a box plus blur), and pixel cells of at least a fixed size in px. Consider defaulting to solid box for anything matched by find_text.
  • In pipeline, reject or warn on redact after zoom or crop-mode reframe, or apply redaction in source coordinates first.
  • Add a find_text video mode that scans sampled or scene-change frames, and update the prompt.
  • Add integration tests that compare pixel variance inside a redacted box with the source for each style.

Done when

  • A rotated input is redacted fully (test).
  • Every style meets a documented minimum strength.
  • Pipeline refuses unsafe redact ordering.
  • The prompt and find_text scan the whole clip.

Activity

  1. added
    bug
    effort: medium
    impact: high
    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

    bugeffort: mediumimpact: highpriority: highprivacy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions