v0.2.6-pre.013-fix.001
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ksp-app-wallet-desk",
|
||||
"private": true,
|
||||
"version": "0.2.6-pre.13",
|
||||
"version": "0.2.6-pre.13.fix.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "KSP Wallet Desk",
|
||||
"version": "0.2.6-pre.13",
|
||||
"version": "0.2.6-pre.13.fix.1",
|
||||
"identifier": "com.sasedev.ksp-app-wallet-desk",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-wallet-desk/tests/release_compliance.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Release-wide deterministic compliance canaries for Wallet Desk.
|
||||
|
||||
@@ -43,16 +43,16 @@ fn read_rust_source_tree(root: &std::path::Path) -> String {
|
||||
return combined;
|
||||
}
|
||||
|
||||
fn struct_field_block<'a>(source: &'a str, name: &str) -> &'a str {
|
||||
fn struct_field_lines(source: &str, name: &str) -> String {
|
||||
let marker = std::format!("struct {name}");
|
||||
let start = source.find(marker.as_str());
|
||||
assert!(start.is_some(), "missing struct {name}");
|
||||
let start = match start {
|
||||
std::option::Option::Some(value) => value,
|
||||
std::option::Option::None => return "",
|
||||
std::option::Option::None => return String::new(),
|
||||
};
|
||||
let tail = &source[start..];
|
||||
return tail.split("}\n").next().unwrap_or_default();
|
||||
let block = source[start..].split("}\n").next().unwrap_or_default();
|
||||
return block.lines().filter(|line| return line.trim_start().starts_with("pub(crate) ")).collect::<std::vec::Vec<_>>().join("\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -135,13 +135,13 @@ fn response_dtos_keep_secret_key_material_out_of_ipc() {
|
||||
(security.as_str(), "WalletViewSecurityStatusDto"),
|
||||
(common.as_str(), "RuntimeStatusDto"),
|
||||
] {
|
||||
let fields = struct_field_block(source, name);
|
||||
let fields = struct_field_lines(source, name);
|
||||
for forbidden in ["password", "secret_key", "private_key", "keypair_bytes", "ciphertext"] {
|
||||
assert!(!fields.contains(forbidden), "response DTO {name} contains forbidden field material {forbidden}");
|
||||
}
|
||||
}
|
||||
let inspection = struct_field_block(import.as_str(), "WalletTransferInspectionDto");
|
||||
let export_result = struct_field_block(export.as_str(), "WalletExportResultDto");
|
||||
let inspection = struct_field_lines(import.as_str(), "WalletTransferInspectionDto");
|
||||
let export_result = struct_field_lines(export.as_str(), "WalletExportResultDto");
|
||||
assert!(!inspection.contains("path"));
|
||||
assert!(!export_result.contains("path"));
|
||||
assert!(!export_result.contains("content"));
|
||||
|
||||
Reference in New Issue
Block a user