Skip to content

feat: SAFARI_BROWSER_SKIP_SR_PREFLIGHT escape hatch — Screen Recording preflight 誤報 false negative 時無 bypass (follow-up from #70 verify) #75

Description

@kiki830621

Problem

#70ScreenshotCommand.run() 開頭加了 CGPreflightScreenCaptureAccess() fail-closed preflight:回 false 即 throw screenRecordingRequired嘗試 capture。

若 preflight 對 controlling process 誤報 false negative(TCC 快取異常、responsible-process 判定與 screencapture 實際歸屬分歧、或未知的 macOS TCC edge case),screenshot 會被完全擋死 —— 即使實際 capture 本來會成功,使用者也沒有任何 bypass。

Type

enhancement

Expected

提供 escape hatch,例如 SAFARI_BROWSER_SKIP_SR_PREFLIGHT=1 env var:設定時跳過 preflight 直接嘗試 capture(失敗時仍走 isScreenRecordingDenial reactive rewrap 路徑,得到雙假設引導訊息)。文件註明這是 preflight 誤報時的診斷用途。

Actual

Preflight false → 必 throw,無條件擋住所有 screenshot 路徑。

Impact

  • 推測性(speculative):尚無實際觀察到 CGPreflightScreenCaptureAccess 誤報的案例;macOS preflight API 一般可靠
  • 但 fail-closed 設計使誤報的 blast radius 是「screenshot 完全不可用且無 workaround」,escape hatch 成本低

Source: surfaced during /idd-verify #70 round 1 (logic lens, finding #14: "Fail-closed preflight has no bypass if CGPreflightScreenCaptureAccess misreports for the child process")

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions