Skip to content

init has no guards — can silently wipe key material #181

@jCabala

Description

@jCabala

If communication_key already exists it skips keypair generation, but it still calls config.write() at line 32 which overwrites the config file. If the config has groups with key shares, those are preserved only because it reads and re-writes the whole config. But there's no confirmation prompt, no backup, and no warning that groups/shares exist. A user running init on a config with active key shares gets no warning.

  • src/cli/init.rs:20-26 — skips keypair but still writes
  • src/cli/init.rs:32 — unconditional config.write()

Originally created in: https://github.com/Nori-zk/mina-multi-sig-example/blob/main/FEEDBACK.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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