Skip to content

Balanced privacy tier: all 3 advertised protections are unimplemented or misleading #60

Description

@yikkuro

Summary

The Balanced privacy tier (which is the recommended default) advertises three protections in Settings → Privacy, but code inspection shows none of them fully work. Two are entirely unimplemented and the third is misleading. Users select the recommended tier believing they get sensitive-file warnings, PII masking/highlighting, and a working "clear history" — none of which happen.

The advertised bullets (en-US.ts lines 247–249):

settings.privacyBalancedDesc1: "Warn before reading sensitive files (.env, keys, certs)"
settings.privacyBalancedDesc2: "Detect & highlight PII (ID numbers, phone, bank cards)"
settings.privacyBalancedDesc3: "Chat history saved, one-click clear"

Claim 1 — "Warn before reading sensitive files (.env, keys, certs)" — ❌ NOT implemented

The "Sensitive File Guard" section only renders a hardcoded, read-only display string. There is no variable, no configurable pattern list, and no enforcement anywhere.

  • desktop/renderer/src/i18n/en-US.ts:266
    "settings.sensitiveFilePatterns": ".env, *_key*, *.pem, *.p12, *.pfx, id_rsa, credentials",
    
  • desktop/renderer/src/views/SettingsView.vue:1074 renders it as static text inside a <span class="row-value">.
  • A search of desktop/src for any file-read guard / confirm-before-read logic returns no matches. The string is identical regardless of the selected privacy level, and nothing is sent to or enforced by the gateway/agent.

Result: nothing warns before the agent reads a sensitive file.

Claim 2 — "Detect & highlight PII (ID numbers, phone, bank cards)" — ❌ highlight/mask does not exist in balanced

scanPii() does run in balanced mode, but the result is discarded — there is no highlight, no mask, no warning.

  • desktop/renderer/src/stores/chat.ts:552-557
    const piiMatches = scanPii(msg);
    if (privacyLevel === "strict" && piiMatches.length > 0) {
      finalMsg = redactPii(msg);   // masking ONLY in strict mode
    }
    // In balanced mode, piiMatches are available for UI warning (future)
    In balanced mode finalMsg is never modified, so the raw, unmasked PII (e.g. a phone number) is both displayed locally and sent to the model. Nothing is highlighted anywhere in the UI.

Related (per-type toggles are decorative): the PII Detection toggles (Phone numbers, ID card, etc.) on the same page are never wired to the scanner or persisted:

  • scanPii(msg) is called with no options, so it always scans all types regardless of the toggles.
  • piiToggles (SettingsView.vue:1458) is local-only reactive state — never passed to scanPii and never saved via settings.set.

Claim 3 — "Chat history saved, one-click clear" — ⚠️ "saved" true, "clear" is misleading

The "Clear All History" button does not clear/delete any history — it saves the current chat and opens a new empty one.

  • desktop/renderer/src/views/SettingsView.vue:2279-2288
    async function clearChatHistory() {
      await ElMessageBox.confirm(t("settings.clearHistoryConfirm"), ...);
      chatStore.newSession();
      ElMessage.success(t("settings.chatHistoryCleared"));
    }
  • desktop/renderer/src/stores/chat.ts:1022-1032 newSession():
    _syncToSessionStore();   // SAVE current session
    _saveCurrentState();     // SAVE to disk
    ... sessionKey = new key; messages.value = [];   // just opens a blank chat

Despite the confirm dialog ("clear history") and the success toast "Chat history cleared", no history is deleted — all prior chats remain in the session store and the sidebar. This is effectively a "New Chat" action mislabeled and mis-announced as "Clear All History".

Impact

Of the 3 protections promised for the recommended privacy tier, only "chat history saved" is true. Sensitive-file warning and PII highlighting/masking do not run in balanced mode, and "one-click clear" clears nothing. This is a privacy/trust concern: users are told they are protected when they are not.

Suggested fixes

  1. PII in balanced: redact whenever matches exist, not just strict — if (piiMatches.length > 0) finalMsg = redactPii(msg); — and/or add the promised highlight/warning UI. Wire piiToggles into scanPii options and persist them.
  2. Sensitive File Guard: actually enforce the pattern list (confirm-before-read hook in the agent/gateway file-read path), or remove the claim/section until implemented.
  3. Clear history: make the button truly delete persisted history (all sessions), or relabel it accurately (e.g. "Start New Chat") and fix the toast text.
  4. Alternatively, update the balanced-mode description bullets to reflect what is actually implemented.

Environment

  • MicroClaw desktop (Electron dev build), privacyLevel: "balanced" (from %APPDATA%\microclaw\settings.json).
  • Found via source inspection of desktop/renderer/src/{stores/chat.ts,views/SettingsView.vue,utils/pii-scanner.ts,i18n/en-US.ts} and desktop/src.

Screenshot

Settings -> Privacy, Balanced (Recommended) tier showing the three advertised protections:

Balanced privacy tier

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions