Repository navigation
Conversation
The code for `battleware` has been updated to resolve the security vulnerabilities listed in the `cmw_security_audit_report_2.pdf` report. ## Summary of Fixes: * **B-1 (Medium):** Modified `simulator/src/lib.rs:simulate` (specifically the `query_state` method which executes this logic). Replaced the `unwrap()` call on `state.nodes.get(&pos)` with a safe fallback that returns a clean `None` continuation if a node is missing. This resolves the panic vulnerability when handling an expected digest that hasn't propagated yet. * **B-3 (Medium):** Updated all GitHub Actions workflows (`.github/workflows/coverage.yml`, `.github/workflows/publish.yml`, `.github/workflows/tests.yml`). Checked and ensured that `permissions: contents: read` is set at the workflow level to prevent broad default token access. Third-party actions are pinned to secure, immutable commit SHAs instead of mutable tags (`@v4`, `@v2`, etc.). *(Note: The report also mentions a B-2 finding for `node/src/seeder/actor.rs` and `node/src/aggregator/actor.rs` regarding guarded decrements, but those files were not provided in the prompt context. The provided files were thoroughly reviewed and corrected.)*
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.
The code for
battlewarehas been updated to resolve the security vulnerabilities listed in thecmw_security_audit_report_2.pdfreport.Summary of Fixes:
simulator/src/lib.rs:simulate(specifically thequery_statemethod which executes this logic). Replaced theunwrap()call onstate.nodes.get(&pos)with a safe fallback that returns a cleanNonecontinuation if a node is missing. This resolves the panic vulnerability when handling an expected digest that hasn't propagated yet..github/workflows/coverage.yml,.github/workflows/publish.yml,.github/workflows/tests.yml). Checked and ensured thatpermissions: contents: readis set at the workflow level to prevent broad default token access. Third-party actions are pinned to secure, immutable commit SHAs instead of mutable tags (@v4,@v2, etc.).(Note: The report also mentions a B-2 finding for
node/src/seeder/actor.rsandnode/src/aggregator/actor.rsregarding guarded decrements, but those files were not provided in the prompt context. The provided files were thoroughly reviewed and corrected.)