Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ tauri-build = { version = "2", features = [] }

[dependencies]
stackwallet-core = { path = "../../../crates/stackwallet-core" }
tauri = { version = "2", features = [] }
tauri = { version = "2.11.1", features = [] }
serde.workspace = true
serde_json.workspace = true
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@vitejs/plugin-react": "6.1.1",
"tailwindcss": "^4.1.0",
"typescript": "7.0.2",
"vite": "8.2.2",
"vite": "8.3.3",
"vitest": "3.2.6",
"wrangler": "^4.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/chains-bitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"bitcoinjs-lib": "7.0.1",
"bitcoinjs-lib": "7.0.2",
"@noble/curves": "2.4.0",
"@noble/hashes": "2.4.0",
"@scure/base": "2.4.0",
Expand Down
25 changes: 25 additions & 0 deletions packages/chains-bitcoin/src/merkle.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Block, Transaction } from 'bitcoinjs-lib';
import { describe, expect, it } from 'vitest';

function coinbaseLike(marker: number): Transaction {
const tx = new Transaction();
tx.version = 2;
tx.addInput(new Uint8Array(32).fill(marker), 0xffffffff);
tx.addOutput(Uint8Array.from([0x51]), 0n);
return tx;
}

describe('block merkle root validation', () => {
it('rejects a transaction list whose duplicate fills the odd-level padding', () => {
const honest = [coinbaseLike(1), coinbaseLike(2), coinbaseLike(3)];
// Duplicating the last of an odd number of transactions reproduces the
// padding hash, so the forged list shares the honest block's merkle root.
const mutated = [...honest, honest[2]!];
expect(Block.calculateMerkleRoot(mutated)).toEqual(Block.calculateMerkleRoot(honest));

const block = new Block();
block.merkleRoot = Block.calculateMerkleRoot(honest);
block.transactions = mutated;
expect(block.checkTxRoots()).toBe(false);
});
});
26 changes: 26 additions & 0 deletions packages/core-client/src/deps-security.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { readFileSync } from 'node:fs';

import { describe, expect, it } from 'vitest';

/**
* Guards the two dependency CVEs fixed by this change so they do not regress:
* - GHSA-xjj6-f33q-929c (undici DoS via excessive content-encodings): the
* resolved undici 7.x line must be >= 7.30.1, not the vulnerable 7.29.1.
* - GHSA-mrhx-c7xc-m3w5 (zod memory exhaustion on oversized constrained
* collections): the resolved zod must be >= 4.6.6.
*/
const lockfile = readFileSync(new URL('../../../pnpm-lock.yaml', import.meta.url), 'utf8');

describe('dependency security pins', () => {
it('resolves undici to the patched 7.x version (GHSA-xjj6-f33q-929c)', () => {
expect(lockfile).toMatch(/^ {2}undici@7\.30\.1:/m);
expect(lockfile).not.toMatch(/^ {2}undici@7\.29\.1:/m);
expect(lockfile).not.toMatch(/undici: 7\.29\.1/);
});

it('resolves zod to the patched 4.6.6 (GHSA-mrhx-c7xc-m3w5)', () => {
expect(lockfile).toMatch(/^ {2}zod@4\.6\.6:/m);
expect(lockfile).not.toMatch(/^ {2}zod@4\.6\.5:/m);
expect(lockfile).not.toMatch(/zod: 4\.6\.5/);
});
});
Loading
Loading