fix: ADR-050 security hardening — HMAC, path traversal, OTA auth#172
Merged
fix: ADR-050 security hardening — HMAC, path traversal, OTA auth#172
Conversation
…ction, OTA auth (ADR-050) Sprint 1 security fixes from quality engineering analysis (issue #170): - Replace XOR-fold fake HMAC with real HMAC-SHA256 (hmac + sha2 crates) in secure_tdm.rs - Add path traversal sanitization on DELETE /api/v1/models/:id and /api/v1/recording/:id - Default bind address changed from 0.0.0.0 to 127.0.0.1 (configurable via --bind-addr / SENSING_BIND_ADDR) - Add PSK authentication to ESP32 OTA firmware upload endpoint (ota_update.c) - Flip WASM signature verification to default-on (CONFIG_WASM_SKIP_SIGNATURE opt-out vs opt-in) - Add 6 new security tests: HMAC key/message sensitivity, determinism, wrong-key rejection, bit-flip detection, enforcing mode - Add clap env feature for environment variable configuration All 106 hardware crate tests pass. Sensing server compiles clean. Closes #170 Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sprint 1 security fixes from the quality engineering analysis (issue #170):
secure_tdm.rsreplaced with real HMAC-SHA256 (hmac+sha2crates):idparameter127.0.0.1instead of0.0.0.0(configurable via--bind-addr/SENSING_BIND_ADDRenv)CONFIG_WASM_SKIP_SIGNATURE) instead of opt-inFiles Changed
secure_tdm.rsmain.rs(sensing-server)ota_update.cwasm_upload.cCargo.toml(hardware)hmac,sha2depsCargo.toml(workspace)envfeatureADR-050Addresses
Test plan
cargo check -p wifi-densepose-hardwarepassescargo check -p wifi-densepose-sensing-serverpassescargo test -p wifi-densepose-hardware— 106/106 tests pass (including 6 new security tests)../../../etc/passwdas model ID returns "invalid model id"🤖 Generated with claude-flow