Repository navigation
Conversation
### Description
This pull request resolves a high-severity credential exposure finding in `quantus-wasm` identified during the Quantus workspace security audit (**FM-12**)[cite: 51].
Previously, the CLI wallet demonstration script (`examples/wallet.mjs`) printed the complete, unredacted 24-word recovery phrase directly to `stdout` upon running `generate`[cite: 51]. Because standard output is routinely captured by shell scrollback buffers, process history, and continuous integration logs, this behavior leaked full cryptographic control of newly generated accounts to unintended observers and persistent log files[cite: 51].
### Key Changes & Remediations
#### Masked Mnemonic Console Output (FM-12 - `examples/wallet.mjs`)
* **Redacted Standard Output:** Replaced the full recovery phrase printout in the `generate` command with a masked summary displaying only the first and last words alongside the word count[cite: 51, 62]:
```javascript
const words = mnemonic.split(" ");
const masked = `${words[0]} ... ${words[words.length - 1]} (${words.length} words — full phrase intentionally NOT printed)`;
console.log(`mnemonic: ${masked}`);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request resolves a high-severity credential exposure finding in
quantus-wasmidentified during the Quantus workspace security audit (FM-12)[cite: 51].Previously, the CLI wallet demonstration script (
examples/wallet.mjs) printed the complete, unredacted 24-word recovery phrase directly tostdoutupon runninggenerate[cite: 51]. Because standard output is routinely captured by shell scrollback buffers, process history, and continuous integration logs, this behavior leaked full cryptographic control of newly generated accounts to unintended observers and persistent log files[cite: 51].Key Changes & Remediations
Masked Mnemonic Console Output (FM-12 -
examples/wallet.mjs)generatecommand with a masked summary displaying only the first and last words alongside the word count[cite: 51, 62]: ```javascript const words = mnemonic.split(" "); const masked =${words[0]} ... ${words[words.length - 1]} (${words.length} words — full phrase intentionally NOT printed); console.log(`mnemonic: ${masked}`);