license: add header to files where it was missing
What changed, and why it matters
This commit only adds Apache-2.0 license header comments to 16 source files that were missing them. It makes no functional changes to the BitBox02 firmware or its Python tools. There is no security impact.
No security action needed. This is a routine license compliance/documentation change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff consists entirely of inserting SPDX-License-Identifier: Apache-2.0 comments (and blank lines) at the top of build scripts, protobuf definitions, Python files, Rust files, C files, and a header template. No code logic, interfaces, dependencies, or build behavior is altered.
Changed components
Inspect captured patch +30 / −0
diff --git a/messages/CMakeLists.txt b/messages/CMakeLists.txt
index a503242..a37cd0d 100644
--- a/messages/CMakeLists.txt
+++ b/messages/CMakeLists.txt
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
set(PROTO_FILES
hww.proto
backup.proto
diff --git a/messages/keystore.proto b/messages/keystore.proto
index d6d5641..4f63cd3 100644
--- a/messages/keystore.proto
+++ b/messages/keystore.proto
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
// This function can be used to get an identifying xpub at the keypath m/4541509'/1112098098'"
// The keypath argument has to be m/4541509'/1112098098'
diff --git a/messages/perform_attestation.proto b/messages/perform_attestation.proto
index 50d0d48..db7f399 100644
--- a/messages/perform_attestation.proto
+++ b/messages/perform_attestation.proto
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package shiftcrypto.bitbox02;
diff --git a/py/Makefile b/py/Makefile
index 4fc0643..bd513e5 100644
--- a/py/Makefile
+++ b/py/Makefile
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
all:
${MAKE} -C bitbox02
diff --git a/py/bitbox02/bitbox02/__init__.py b/py/bitbox02/bitbox02/__init__.py
index fd035dc..67c6f63 100644
--- a/py/bitbox02/bitbox02/__init__.py
+++ b/py/bitbox02/bitbox02/__init__.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
"""
This file re-exports all symbols from the nested bitbox02 subpackage.
diff --git a/py/u2f/bitbox02.py b/py/u2f/bitbox02.py
index 07c04f5..9f6a149 100644
--- a/py/u2f/bitbox02.py
+++ b/py/u2f/bitbox02.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
"""Helpers for doing U2F with bitbox02"""
from typing import Tuple
diff --git a/releases/build.sh b/releases/build.sh
index 5858bb0..88193cd 100755
--- a/releases/build.sh
+++ b/releases/build.sh
@@ -1,4 +1,5 @@
#!/bin/bash -e
+# SPDX-License-Identifier: Apache-2.0
# To maintainers: keep this script straight forward to follow and
# review.
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 0a68e89..ab8e667 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
if(PYTHONINTERP_FOUND)
# This template flashes with an offset
foreach(target ${FIRMWARES})
diff --git a/scripts/graphics/Makefile b/scripts/graphics/Makefile
index a8fd9ba..a44331e 100644
--- a/scripts/graphics/Makefile
+++ b/scripts/graphics/Makefile
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: Apache-2.0
+
SOURCES=bb02_logo.png bb02_btc_logo.png bb02_multi_logo.png
%.pbm: %.png
diff --git a/scripts/graphics/convert.py b/scripts/graphics/convert.py
index bf70c0c..0f2704d 100755
--- a/scripts/graphics/convert.py
+++ b/scripts/graphics/convert.py
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
+# SPDX-License-Identifier: Apache-2.0
+
"""Helper script to convert images to c source code"""
import argparse
diff --git a/src/rust/bitbox02-rust/src/hww/api/change_password.rs b/src/rust/bitbox02-rust/src/hww/api/change_password.rs
index d3c2754..bb96998 100644
--- a/src/rust/bitbox02-rust/src/hww/api/change_password.rs
+++ b/src/rust/bitbox02-rust/src/hww/api/change_password.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
use super::Error;
use crate::pb;
diff --git a/src/rust/util/src/log.rs b/src/rust/util/src/log.rs
index d50d6d9..6f497c4 100644
--- a/src/rust/util/src/log.rs
+++ b/src/rust/util/src/log.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
// Re-export rtt_target so that it is available to the macro user
#[cfg(all(feature = "rtt", target_os = "none"))]
pub use ::rtt_target;
diff --git a/src/u2f/u2f_app.c b/src/u2f/u2f_app.c
index f424160..2fed797 100644
--- a/src/u2f/u2f_app.c
+++ b/src/u2f/u2f_app.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
#include "u2f_app.h"
#include <hardfault.h>
diff --git a/src/ui/graphics/graphics.c b/src/ui/graphics/graphics.c
index a1510d1..502c56b 100644
--- a/src/ui/graphics/graphics.c
+++ b/src/ui/graphics/graphics.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
#include "graphics.h"
#include <screen.h>
diff --git a/src/usb/u2f/u2f_keys.h b/src/usb/u2f/u2f_keys.h
index 6536913..b2cce03 100644
--- a/src/usb/u2f/u2f_keys.h
+++ b/src/usb/u2f/u2f_keys.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
#ifndef __U2F_KEYS_H_INCLUDED__
#define __U2F_KEYS_H_INCLUDED__
diff --git a/src/version.h.in b/src/version.h.in
index 3462b59..0631c53 100644
--- a/src/version.h.in
+++ b/src/version.h.in
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0
+
#ifndef VERSION_H
#define VERSION_H
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.