Skip to content

feat(security): full cross-language Tauri IPC taint — TS invoke() to Rust command (beyond #240 MVP) #257

Description

@Wolfvin

Mengapa

Follow-up dari #240 (Rust taint MVP, PR #250 merged) + gap-analysis vs Serena. #240 sengaja narrowed: parameter #[tauri::command] (untrusted-by-construction) → sink dalam body fungsi yang sama (intra-procedural). Yang MASIH belum: korelasi lintas bahasa penuh — trace value dari TS invoke("cmd", {arg: userInput}) MELINTASI IPC boundary ke Rust #[tauri::command] fn cmd(arg). Ini jalur celah paling nyata di app Tauri/Electron: data frontend user → backend Rust shell/fs. Verified gap di docs/design/0240-tauri-command-param-taint.md ("full cross-language IPC correlation is out of scope for this MVP").

Konteks

#240 sudah bangun scripts/rust_command_taint.py (regex-based, deteksi param→sink di Rust side). Yang kurang: match string literal command name di TS invoke("cmd", ...) ke fungsi #[tauri::command] fn cmd. Butuh cross-language edge yang graph sekarang TIDAK bangun (graph edges = same-language call edges, bukan string-literal-to-attribute correlation). Ini yang bikin #240 di-scope kecil.

Tujuan

Korelasikan TS invoke("X", {taintedArg}) dengan Rust #[tauri::command] fn X(arg) — kalau argumen invoke berasal dari untrusted source (user input di TS) DAN parameter Rust yang cocok reach sink, laporkan sebagai cross-language taint path lengkap (TS source → IPC → Rust sink).

Constraint

Definition of Done

  • Design doc: arsitektur cross-language correlation ATAU rekomendasi tidak-lanjut dengan alasan (RFC-style, outcome valid)
  • KALAU lanjut: deteksi minimal 1 path nyata TS invoke(userInput) → Rust command → sink, verified di workspace nyata
  • Handle command-name collision (2 command nama sama)
  • Regression test

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions