mirror of
https://github.com/larksuite/cli.git
synced 2026-08-03 08:32:46 +08:00
Third-round review (comprehensive CR on PR #2091) — close the P1s by reverting the two global protocol changes and tightening the rest: - cmdutil confirm (F1): drop the argv-rebuilt "re-run:" retry line and every heuristic behind it; the hint is the plain "add --yes to confirm" again. argv cannot faithfully reproduce the invocation (pipelines, stdin, redirections, env, executable path), POSIX quoting breaks on PowerShell/cmd.exe, and the name-based secret guard both leaked free-form payloads and false-positived on ordinary token locators (--spreadsheet-token). Callers append --yes to their own saved argv after user consent, per the lark-shared protocol. - localfileio/validate/cmdutil (F4): remove the SafeTempAbsInputPath @file exception — TMPDIR-defined trust roots are not a security boundary (TMPDIR=/etc widened the allowed region) and the fast path bypassed the caller's FileIO provider. @file is strictly cwd-relative again; out-of-tree content goes through stdin. - csv guard (F5): stop splicing the untrusted --csv value into command-shaped hint text; prescriptions use <path> placeholders, the value is only named as quoted data. - read offload (F8): --output-path now raises max_chars to a bounded 20M-char default instead of the 1e9 sentinel — the read path is not streaming, so the cap is the OOM guard; an explicit --max-chars still overrides. - batch-update tips + skill (F2, synced from sheet-skill-spec): replace "always pass --yes" / "首次调用就带 --yes" with the consent protocol (dry-run, show the plan, get explicit approval, then append --yes). - skill docs (F12, synced): scripts/lark_*.py are an optional enhancement — binary-embedded skills ship without scripts/, so the docs now say so and point at the CLI-equivalent fallback paths.