v0.3.15-pre.006
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-raw-transaction-ingest-desk/tests/desktop_security.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Desktop security canaries for the Raw Transaction Ingest Desk scaffold.
|
||||
|
||||
@@ -58,15 +58,27 @@ fn pre_005_frontend_has_no_network_persistence_or_native_dialog_surface() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_005_frontend_tracing_is_control_and_command_oriented_only() {
|
||||
fn pre_006_frontend_tracing_is_control_inventory_and_command_oriented_only() {
|
||||
let main = read_text(app_root().join("frontend/ts/main.ts").as_path());
|
||||
assert!(main.contains("frontend control clicked"));
|
||||
assert!(main.contains("navigation tab clicked"));
|
||||
assert!(main.contains("runtime status refresh requested"));
|
||||
assert!(main.contains("route foundation refresh requested"));
|
||||
assert!(main.contains("Config route inventory refresh requested"));
|
||||
assert!(main.contains("logical profile selected"));
|
||||
let invoke = read_text(app_root().join("frontend/ts/invoke.ts").as_path());
|
||||
assert!(invoke.contains("Frontend IPC command requested"));
|
||||
for forbidden in ["apiKey", "authorization", "connectionUri", "endpointUrl", "sourceKey", "rawTransaction", "transactionPayload"] {
|
||||
for forbidden in ["apiKey", "authorization", "connectionUri", "endpointUrl", "sourceKey", "rawTransaction", "transactionPayload", "x-token"] {
|
||||
assert!(!main.contains(forbidden), "frontend contains forbidden sensitive marker {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_route_inventory_dto_surface_excludes_endpoint_secret_and_physical_store_fields() {
|
||||
let dto = read_text(app_root().join("src/dto_route.rs").as_path());
|
||||
for required in ["RawIngestRouteInventoryDto", "RawIngestProfileInventoryDto", "RawIngestRouteUnavailableReason"] {
|
||||
assert!(dto.contains(required));
|
||||
}
|
||||
for forbidden in ["endpoint_name", "endpoint_url", "api_key", "connection_uri", "source_key", "secret_metadata", "worker_handle"] {
|
||||
assert!(!dto.contains(forbidden), "route DTO contains forbidden field marker {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user