When a Tauri application uses the dialog plugin's file or folder picker, an attacker with JavaScript execution (XSS) can force the scope expansion to be recursive, granting read/write access to an entire directory tree after a single user click on a normal-looking OS file dialog. The user has no indication that recursive access was granted, and the expanded scope cannot be revoked for the lifetime of the application.
The fix is to stop taking the recursion flag from the caller. Grant what was actually chosen: the one file, or the one folder and nothing below it. An app that genuinely needs a recursive grant can ask for one in its own Rust code, where the frontend cannot reach it.