v2jadesign: allow giving the device serial port to sign with
What changed, and why it matters
This commit updates a release signing helper script so the operator can optionally specify which serial port a connected Jade hardware device uses. It is a usability/operational change, not a fix for a software vulnerability in the device or wallet itself. There is no indication it addresses a security incident.
No security action required. Treat as routine release-tooling improvement. Reviewers may verify the argument parser handles malformed input safely, but the change itself is low risk.
Security signals we found
No security-relevant keywords in commit title or message
No CVE, advisory, bug bounty, or researcher attribution in commit
Change is confined to a release helper script
No modification to firmware, wallet, or cryptographic code
Optional serial-port argument is passed through to existing signing script
Evidence from the diff
The shell script release/scripts/v2jadesign.sh is refactored from fixed positional arguments to a small argument parser that accepts
Changed components
release/scripts/v2jadesign.shInspect captured patch +30 / −6
diff --git a/release/scripts/v2jadesign.sh b/release/scripts/v2jadesign.sh
index 5e66bef..13e5bab 100755
--- a/release/scripts/v2jadesign.sh
+++ b/release/scripts/v2jadesign.sh
@@ -1,12 +1,36 @@
#!/bin/bash
-if [ -z "${1}" -o -z "${2}" ]
-then
- echo "Usage: ${0} <version/dir> <key_label>"
+function usage {
+ echo "Usage: ${0} <version/dir> <key_label> [--serialport PORT]"
+}
+
+VER_DIR=""
+KEY_LABEL=""
+JADE_SERIAL_ARG=""
+
+while true; do
+ case "$1" in
+ --serialport) JADE_SERIAL_ARG="${1} ${2}"; shift 2 ;;
+ -h | --help)
+ usage;
+ exit 0 ;;
+ "") break ;;
+ *)
+ if [ -z "${VER_DIR}" ]; then
+ VER_DIR="${1}"; shift;
+ elif [ -z "${KEY_LABEL}" ]; then
+ KEY_LABEL="${1}"; shift;
+ else
+ usage;
+ exit 1
+ fi ;;
+ esac
+done
+
+if [ -z "${VER_DIR}" -o -z "${KEY_LABEL}" ]; then
+ usage
exit 1
fi
-VER_DIR="${1}"
-KEY_LABEL="${2}"
WORKING_DIR="staging/${VER_DIR}/jade2.0"
@@ -35,7 +59,7 @@ SIG_SUFFIX="${KEY_LABEL}.sig"
HASH_OPTS="-sha256 -binary"
VERIFY_OPTS="-pubin -inkey ${PUBKEY} -pkeyopt digest:sha256 -pkeyopt rsa_padding_mode:pss"
-JADE_SIGN_CMD="python ../../../../jade_bip85_rsa_sign.py ${LOGGING} ${CHECK_JADE_PUBKEY} --keylen ${KEYLEN} --index ${INDEX} --digest-files"
+JADE_SIGN_CMD="python ../../../../jade_bip85_rsa_sign.py ${JADE_SERIAL_ARG} ${LOGGING} ${CHECK_JADE_PUBKEY} --keylen ${KEYLEN} --index ${INDEX} --digest-files"
pushd "${WORKING_DIR}"
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.