Revert "chore: adding the bootloader to upgrade binary for next release"
What changed, and why it matters
This commit undoes a previous change that added the bootloader to the device's upgrade binary. It removes the bootloader from the generated upgrade file and also removes a 'set -e' safety flag from the build script. On its own, this revert does not introduce a clear security vulnerability; it is a build-script change whose security implications depend heavily on whether the bootloader is supposed to be included in upgrades.
Review the original commit 54a38094e822c42b6acaabf30a5cbbca418388ef and any related release notes or issues to confirm whether including the bootloader in the upgrade binary was intentional for security or functionality. If the bootloader should be included, this revert may be a regression and should be re-applied. Also consider re-adding 'set -e' to avoid silent build failures.
Security signals we found
Build script change affecting firmware packaging
Bootloader removed from upgrade binary generation
set -e error-on-fail flag removed from shell script
Evidence from the diff
The commit reverts 54a38094e822c42b6acaabf30a5cbbca418388ef. It changes build_firmware.sh so that upgrade-generator.py is invoked without the -b bootloader argument, meaning the produced specter_upgrade.bin no longer contains the bootloader. It also removes ‘set -e’ from the script, so subsequent build failures will no longer cause the script to exit immediately. The diff alone does not show a vulnerability; the change could be a correction (if the bootloader should not be upgraded) or a regression (if the bootloader should be upgraded). No security-relevant context is provided in the commit message or diff.
Changed components
build_firmware.shrelease/specter_upgrade.bin generation processInspect captured patch +2 / −5
diff --git a/build_firmware.sh b/build_firmware.sh
index 2822c71..95cecce 100755
--- a/build_firmware.sh
+++ b/build_firmware.sh
@@ -1,7 +1,4 @@
#!/bin/bash
-
-set -e
-
INFO="\e[1;36m"
ENDCOLOR="\e[0m"
@@ -27,7 +24,7 @@ mkdir -p release
python3 ./bootloader/tools/make-initial-firmware.py -s ./bootloader/build/stm32f469disco/startup/release/startup.hex -b ./bootloader/build/stm32f469disco/bootloader/release/bootloader.hex -f ./bin/specter-diy.hex -bin ./release/initial_firmware.bin
echo -e "Initial firmware saved to release/initial_firmware.bin"
-python3 ./bootloader/tools/upgrade-generator.py gen -f ./bin/specter-diy.hex -b ./bootloader/build/stm32f469disco/bootloader/release/bootloader.hex -p stm32f469disco ./release/specter_upgrade.bin
+python3 ./bootloader/tools/upgrade-generator.py gen -f ./bin/specter-diy.hex -p stm32f469disco ./release/specter_upgrade.bin
cp ./release/specter_upgrade.bin ./release/specter_upgrade_unsigned.bin
echo "Unsigned upgrate file saved to release/specter_upgrade_unsigned.bin"
@@ -67,4 +64,4 @@ cat sha256.txt
echo "
Hashes saved to release/sha256.txt file.
-"
+"
\ No newline at end of file
Why this scored 11/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.