Add compile-time checks for silent reboot, disabled core dumps, and disabled debugger-aware panic handling. Include regression coverage, hardening guidance, and update Phase 8/9 project status.
Crash/debug build-policy regression
Run from the repository root:
python3 tests/security_build_policy/run.py
pio run
python3 tests/security_build_policy/run.py --sdkconfig-header .pio/build/esp32-s3-devkitc-1-n16r8/config/sdkconfig.h
Requires Python 3.9+ and a host C compiler (cc, or CC). If a compiler wrapper cannot write its cache in a sandbox, prefix the Python commands with CCACHE_DISABLE=1.
The harness compiles the actual src/security_build_policy.c, not a reimplementation. It checks 17 cases: safe undefined/zero disabled booleans, absent configuration, each absent/zero required setting, each forbidden setting enabled independently, and the tracked defaults. It also checks production CMake registration. The optional generated-header check adds an eighteenth case and must follow a successful firmware build; a stale header is not evidence of current firmware configuration.
Expected-invalid fixtures must fail with the policy's diagnostic. Compiler execution failures or unrelated diagnostics do not count as successful negative tests. No firmware is flashed and no secrets, partition contents or device memory are collected.
These tests do not exercise actual panic output, reboot/recovery behavior, physical debugging or log redaction. See Phase 9 policy and target gates.