tiletopia/src
megaproxy 5b970f8b48 Hard-deny: PowerShell patterns + drift-proof the label list
Four new compiled-in hard-deny rules covering PowerShell + cmd.exe
catastrophic patterns (mirror of the POSIX 10):

- Remove-Item / del / rd / ri / rm / erase / rmdir targeting C:\
  or user home / appdata
- Format-Volume / Clear-Disk with any flag (= an invocation, not a
  Get-Help lookup)
- iwr | iex pipe form (PowerShell web-to-execute)
- iex (irm ...) parenthesized form

Universal application — no shell-aware scoping yet. PS cmdlet
identifiers are distinctive enough that bash false-positives are
vanishingly unlikely. Shell-aware policy scoping remains a known
follow-up.

Drift-proof the "Always blocked" label list: backend now exposes
hard_deny_rules() via a new mcp_hard_deny_labels Tauri command, and
PolicyTab loads it at mount instead of hardcoding the list. Avoids
the 11→15 manual sync that would have been needed (and that had
already drifted twice this week).

cargo test --lib: 138 passed; 0 failed (118 prior + 20 new fuzz
cases for rules 11-14; hard_deny_rules_count bumped 10 → 14).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:14:42 +01:00
..
components Hard-deny: PowerShell patterns + drift-proof the label list 2026-05-26 17:14:42 +01:00
lib MCP v2 PR-3: write_pane, spawn_pane, connect_host + SSH safeguards 2026-05-26 14:50:06 +01:00
App.css Tidy titlebar: dropdowns for shell + layout, '+' button to spawn 2026-05-25 22:26:41 +01:00
App.tsx MCP v2 PR-4: add_host + delete_host + extraArgs sanitiser + third SSH safeguard 2026-05-26 16:04:14 +01:00
ipc.ts Hard-deny: PowerShell patterns + drift-proof the label list 2026-05-26 17:14:42 +01:00
main.tsx MCP v2 PR-3: write_pane, spawn_pane, connect_host + SSH safeguards 2026-05-26 14:50:06 +01:00
styles.css Theme scrollbars + global broadcast toggle 2026-05-22 18:18:56 +01:00