Repository navigation
fix(cli): refuse to sign with the shared dev account unless opted in - #320
Merged
Merged
Conversation
Write commands now fail when nothing but the built-in default mnemonic resolves; --allow-dev-account or DOTNS_ALLOW_DEV_ACCOUNT=1 opts back in. The dev-account and argv-secret warnings are written through a stderr binding taken before the --json console capture, so they stay visible in machine-readable runs, and read-only commands now say when they are reporting on the dev account.
re-gius
force-pushed
the
fix/dev-account-fail-closed
branch
from
October 14, 2026 09:38
60be5ce to
9724b4e
Compare
re-gius
marked this pull request as ready for review
October 14, 2026 09:38
CI Summary
Release - PassedTest this PR Download artifact (GitHub CLI required): gh run download 38551963185 -n cli-release-0.0.0-pr.320 -R paritytech/dotns-sdkInstall globally: npm install -g ./parity-dotns-cli-0.0.0-pr.320.tgzVerify: dotns --helpDeploy Example — Passed
Labelspkg: cli, type: docs, type: test, dependencies Test - Passed395 passed, 0 failed across 395 tests. |
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
--allow-dev-accountorDOTNS_ALLOW_DEV_ACCOUNT=1opts back in (still warns). The README already documented this refusal; the code only warned.--mnemonic-on-argv warnings are written through a stderr binding taken before the--jsonconsole capture, so they reach stderr in machine-readable runs while stdout stays clean JSON.pop status,lookup, …) now say on stderr when they are reporting on the dev account; they never warned before.Type
Package
@parity/dotns-cliFixes
Fixes paritytech/dotns#292
Checklist
Code
bun run lintpassesbun run formatpassesbun run typecheckpassesDocumentation
Breaking Changes
Breaking changes: a write command with no key configured (no flags, no
DOTNS_MNEMONIC/DOTNS_KEY_URI, no keystore) now exits 1 withNo signing account configured — refusing to sign with the shared public dev account.Scripts that relied on the implicit dev account must pass--allow-dev-accountor setDOTNS_ALLOW_DEV_ACCOUNT=1. Read-only commands are unaffected.Testing
353 pass, 0 fail.
With a clean
HOMEand noDOTNS_MNEMONIC/DOTNS_KEY_URIset, against paseo-v2:exit 1, stdout empty, stderr
{"error":"No signing account configured — refusing to sign with the shared public dev account. …"}.proceeds; stderr
⚠ Signing with the shared public dev account that anyone can control., stdout clean JSON.exit 0, stdout unchanged JSON, stderr
⚠ No account configured — reporting on the shared public dev account.(was 0 bytes).Version bumped to 0.10.0 for the release guard.