diff --git a/AGENTS.md b/AGENTS.md index 029bba0..e3364cc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -185,7 +185,7 @@ Same scheme as the other Craft apps: (window embedding, `shutdown /m`, mmc tools) degrade to a clear message elsewhere. - **Secrets on command lines:** a password given to another program goes through a pipe, a file only the user can read, the environment of that one child, or an API — not through its arguments. - Still open and listed in `ROADMAP.md`: PuTTY/plink/psftp/pscp (`-pw`) and FreeRDP (`/p:`). + Still open (work list in `ROADMAP.md`): PuTTY/plink/psftp/pscp (`-pw`) and FreeRDP (`/p:`). - **Time goes through `chrono`** (`src/timefmt.rs`); no hand-written calendar code. - **No new C dependencies** without need; `ring` is the exception. - **Licences:** a new dependency must fit the allowlist above. Known exceptions already in the diff --git a/ROADMAP.md b/ROADMAP.md index 64aa29b..97f03b5 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -24,23 +24,55 @@ - KeePass as connection list with KeePassXC open at the same time; SNMP against real switches. - Linux and macOS builds (compiled and run there). -## Known limits (security and Craft house rules) - -- **Passwords on command lines:** PuTTY, plink, psftp and pscp get the password with `-pw`, FreeRDP - with `/p:`. Other programs of the same user can read it while they start. Planned: PuTTY's - `-pwfile` (0.77 and newer) and FreeRDP's `/from-stdin`. Remote Desktop on Windows is done - (Credential Manager API, entry removed after the start). -- **Without a master password** saved passwords are only obscured (the key is in the same file). - Planned: say so in the window when the first password is saved, and offer the master password. -- **Passwords in memory** are wiped for the key and the key derivation; the passwords of open - connections are not yet. -- **Licences:** `Zlib`, `BSL-1.0` and `CDLA-Permissive-2.0` crates are not on the Craft allowlist - (see `ATTRIBUTION.md`); to be cleared with `storytold/craft-contrib`. -- **Shared CI:** `ci.yml` and `release.yml` run their own jobs; the shared Craft gate and release - workflows need a workspace with `cargo xtask ci`. Same step: split the one crate into - `crates/` (model, network tools, no egui) and `apps/` and bring `src/app.rs` down to size. -- **Contributor credits** (`contributors/`, shown in *About*) are not set up yet. -- Releases are unsigned; macOS is built for Apple silicon only. +## Work list (security and Craft house rules) + +Open work, most useful first. Each item is one pull request against `main`: read `AGENTS.md` +first, run `cargo fmt --check`, `cargo clippy --all-targets --locked -- -D warnings` and +`cargo test --locked` before pushing, add a test for new logic, and add every new text to all four +`lang/*.lang` files. Tick an item off here in the pull request that finishes it. + +1. **Password generator must not hide a failing random source.** `random_bytes` in + `src/admintools.rs` ignores the error of `getrandom::fill` and would then build a password from + zero bytes. Return a `Result` and show the error instead of a password (the control channel in + `src/control.rs` already does this for its token). Small. +2. **Say in the window that passwords without a master password are only obscured.** The status + bar and the README say it; add a clear hint with a button to *Settings » master password* at + the moment the first password is saved without one (`src/app.rs`, the properties panel and + `Store::save` in `src/model.rs` show where passwords are stored). Check with + `--screenshot`. Small. +3. **Wipe the passwords of connections from memory.** Only the vault key and the key-derivation + input are wiped (`Vault` in `src/model.rs`). `Creds.password`, `Entry.password`, the session + passwords in `src/app.rs` and the auto-typing rules in `src/terminal.rs` are plain `String`s. + Move them to `zeroize::Zeroizing` (the crate is already a dependency); serde needs + `zeroize`'s `serde` feature or a small wrapper. Medium; the compiler finds every place. +4. **No passwords on command lines for PuTTY and FreeRDP.** `launch_putty` in `src/launch.rs` + and the psftp/pscp/plink calls in `src/transfer.rs` pass `-pw `; FreeRDP gets + `/p:`. Other programs of the same user can read that. Use PuTTY's `-pwfile ` + (PuTTY 0.77 and newer; a file only the user can read, removed afterwards — keep `-pw` as the + fallback for older versions and say so in the tab) and FreeRDP's `/from-stdin`. Needs a real + PuTTY and a Linux machine with FreeRDP to try; say in the pull request what was tried. + Remote Desktop on Windows is done (`src/wincred.rs`). +5. **The saved WebDAV password** (`src/remote.rs`) is encrypted with a key built into the + program, so it is only obscured. Encrypt it with the store's vault when a master password is set. +6. **Licences outside the allowlist** (`ATTRIBUTION.md`): `Zlib` and `BSL-1.0` come with egui and + can't be swapped; ask in `storytold/craft-contrib` whether they join the allowlist. + `CDLA-Permissive-2.0` is `webpki-roots`; it can be replaced by the system's certificate store + (`rustls-platform-verifier` or `rustls-native-certs`) if that licence stays out. + Add `cargo deny` with the allowlist to CI once this is settled. +7. **Contributor credits.** `contributors/people.toml` and `contributors/contributors.json` as in + the other Craft apps, shown in *Help » About*. Add only entries their owners asked for. +8. **Split the crate.** `crates/` for model, storage, import, network tools and transfer (no + egui), `apps/admincraft` for the window, `xtask` for `cargo xtask ci`; bring `src/app.rs` + (about 5,000 lines) down by moving each dialog and tab into its own module. Many small pull + requests, tests green after each. This is the precondition for the next item. +9. **Shared CI.** Replace the jobs in `ci.yml` and `release.yml` by calls to the shared gate and + release workflows in `storytold/craft-common-actions` (they expect `cargo xtask ci`). +10. **Releases:** add an Intel macOS build; sign the Windows and macOS programs once + certificates exist. + +Done and to be tried against real servers: the Remote Desktop login through the Credential +Manager (`src/wincred.rs`) — log in to a real host with *Pass the login automatically* and check +that the entry is gone from the Credential Manager about two minutes later. ## Craft principles