v0.3.8-pre.007-fix.002

This commit is contained in:
2026-09-03 18:51:37 +02:00
parent 32577ea48d
commit c9e52d1926
7 changed files with 148 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-store-desk/tests/desktop_security.rs
// version: 6
// version: 7
//! Security boundary tests for the Store Desk scaffold.
@@ -137,13 +137,22 @@ fn pre_007_fix_001_copy_tracing_never_logs_long_identifier_values() {
assert!(frontend.contains("Store Desk long text copy failed"));
assert!(frontend.contains("{ fieldId }"));
for forbidden in [
"copy requested", { value",
"copy completed", { value",
"copy failed", { value",
"copy requested", { signature",
"copy completed", { signature",
"copy failed", { signature",
r#"{ fieldId, value }"#,
r#"{ value, fieldId }"#,
r#"{ value }"#,
r#"{ signature }"#,
r#"{ fieldId, signature }"#,
r#"{ signature, fieldId }"#,
] {
assert!(!frontend.contains(forbidden), "long identifier value leaked into copy tracing: {forbidden}");
}
}
#[test]
fn pre_007_fix_002_payload_preview_copy_never_logs_preview_material() {
let frontend = include_str!("../frontend/ts/main.ts");
assert!(frontend.contains(r#"payloadPreviewCopy.dataset.copyField = "transaction-payload-preview""#));
assert!(!frontend.contains(r#"frontendDebug("main", "Store Desk long text copy requested", { fieldId, value })"#));
assert!(!frontend.contains(r#"frontendDebug("main", "Store Desk long text copy completed", { fieldId, value })"#));
assert!(!frontend.contains(r#"frontendError("main", "Store Desk long text copy failed", { fieldId, value })"#));
}