Skip to content

🔴 High: Password serde skip bypassed by raw SQL queries #47

@EVWorth

Description

@EVWorth

Problem

While \ConnectionProfile\ has #[serde(skip_serializing, default)]\ on the password field, the \store.rs::list()\ method manually reconstructs \ConnectionProfile\ from raw SQL rows including the password. This serialized profile is then sent to the frontend via \list_connection_profiles\ command.

Impact

Passwords leak to the frontend JavaScript context unnecessarily, where they can be inspected via devtools or leaked via errors.

Affected Files

  • \src-tauri/crates/mas-core/src/models/connection.rs:13\
  • \src-tauri/crates/mas-core/src/connection/store.rs:102-122\

Suggested Fix

Create a separate \ConnectionProfileSummary\ struct without the password field for listing. Only include password when explicitly needed for authentication.

Severity: High — Security/data leakage

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions