fix: STPA-Sec round 3 — artifact updates + 3 hardening fixes#81
Merged
Conversation
STPA artifact updates: - Document R1+R2 fix status (14 fixes from PR #80) - Add 3 new hazards: H-36 (cache flooding), H-37 (PATH injection), H-38 (MCUboot partial-image) - Add 3 new system constraints: SC-34 (cache bound), SC-35 (build env path logging), SC-36 (MCUboot size validation) - Add 3 new attack scenarios: AS-34, AS-35, AS-36 Code fixes: - SC-34: MemoryProofCache now enforces max_entries (default 10,000) with oldest-entry eviction when at capacity - SC-35: BuildEnvironment::capture() resolves and logs absolute paths of tool binaries, supports WSC_<TOOL>_PATH override env vars - SC-36: MCUboot parser rejects images where trailing content exceeds 8KB (MAX_TLV_OVERHEAD), preventing partial-image signature attacks All 766 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
STPA-Sec cross-reference audit: mapped all 35 hazards and 33 system constraints against actual code state. Updated artifacts to reflect PR #80 fixes, identified 3 new gaps, implemented fixes.
STPA Artifact Updates
Code Fixes
MemoryProofCachenow enforcesmax_entries(default 10,000) with oldest-entry eviction. Prevents cache flooding DoS (AS-34)BuildEnvironment::capture()resolves and logs absolute tool paths. SupportsWSC_<TOOL>_PATHoverride env vars for operators to pin trusted binaries (AS-35)MAX_TLV_OVERHEAD), preventing partial-image signature attacks whereih_img_sizeis set smaller than actual payload (AS-36)Test plan
cargo build— cleancargo test— 766 passed, 0 failed🤖 Generated with Claude Code