v0.2.6-pre.005

This commit is contained in:
2026-08-21 09:33:04 +02:00
parent 2132dfd884
commit 7aa38b0daf
19 changed files with 980 additions and 126 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-wallet-desk/tests/desktop_security.rs
// version: 2
// version: 3
//! Static desktop security contracts for the Wallet Desk pre.002 shell.
@@ -46,3 +46,20 @@ fn locked_inventory_frontend_never_receives_protected_wallet_identity_fields() {
assert!(!inventory.contains("notes:"));
assert!(!inventory.contains("password:"));
}
#[test]
fn create_passwords_are_request_only_and_protected_projection_is_purged() {
let root = app_root();
let session = read_text(root.join("src/wallet_session.rs").as_path());
let main = read_text(root.join("frontend/ts/main.ts").as_path());
let authorized = session.split("pub(crate) struct WalletAuthorizedDto").nth(1);
assert!(authorized.is_some());
let authorized = authorized.unwrap_or_default().split("}\n\n/// Create request").next().unwrap_or_default();
assert!(!authorized.contains("password"));
assert!(session[request_start..].contains("owner_password"));
assert!(session[request_start..].contains("view_password"));
assert!(main.contains("clearAuthorizedProjection"));
assert!(main.contains("clearCreateFormSensitiveInputs"));
assert!(!main.contains("frontendDebug(\"main\", request.ownerPassword"));
assert!(!main.contains("frontendTrace(\"main\", request.viewPassword"));
}