build: print firmware hash in console before writing to the file
What changed, and why it matters
This change simply adds a console log message that prints the firmware file's hash before saving that same hash to a file. It does not alter security behavior, access controls, or cryptographic operations. It is a transparency/logging improvement for the build process.
No security action needed. This is a benign build-logging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In tools/fwprep.py, a single line was added to log the SHA-256 hash of the generated firmware image to the console via logger.info() before writing the hash to the .hash file. The hash computation and file write remain unchanged. No code paths, permissions, or cryptographic logic were modified.
Changed components
tools/fwprep.pyInspect captured patch +2 / −1
diff --git a/tools/fwprep.py b/tools/fwprep.py
index 8d11c34..540180d 100755
--- a/tools/fwprep.py
+++ b/tools/fwprep.py
@@ -20,8 +20,9 @@ def create_compressed_firmware_image(fwfilename, outputdir):
outfile = fwtools.get_firmware_compressed_filepath(firmware, outputdir)
# Write the full firmware image hash
- hashfile = outfile + ".hash"
+ hashfile = outfile + '.hash'
hash = hashlib.sha256(firmware).hexdigest()
+ logger.info(f'Hash of {outfile} is {hash}')
fwtools.write(hash, hashfile, text=True)
# Compress and write
Why this scored 15/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.