Fix governance list input validation#444
Closed
carrion256 wants to merge 1 commit into
Closed
Conversation
…980d83b8a53) Reject duplicate Soroban governance config address lists in the runtime application path and duplicate supply-queue target IDs at governance submission. Empty list inputs remain explicit clear semantics for configurable lists and supply queues. Verification: - cargo test -p templar-soroban-runtime test_governance_config_rejects_duplicate_address_lists -- --nocapture - cargo test -p templar-soroban-runtime test_governance_config_empty_lists_keep_clear_semantics -- --nocapture - cargo test -p templar-soroban-governance submit_set_supply_queue_rejects_duplicate_targets -- --nocapture - cargo test -p templar-soroban-governance submit_set_supply_queue_allows_empty_clear_policy -- --nocapture - cargo test -p templar-soroban-runtime --lib -- --nocapture - cargo test -p templar-soroban-governance -- --nocapture - just -f contract/vault/soroban/justfile size-budget-check (runtime deploy 93969 bytes)
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Collaborator
Author
Collaborator
Author
|
Closed as superseded by consolidated governance control-plane PR #427. |
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
Fixes A-066 / Nexus
b7898751-488c-4530-a728-d980d83b8a53.This PR makes the vault/governance list-input policy explicit:
execute_governanceapplication path;target_idsat governancesubmit_set_supply_queuetime, before a misleading pending proposal can be queued;Fixed Findings
b7898751-488c-4530-a728-d980d83b8a5326cc9a99719790c634ffedf3c5a86cb96cc816aecontract/vault/soroban/governance/src/lib.rscontract/vault/soroban/governance/src/tests.rscontract/vault/soroban/src/contract/entrypoints.rscontract/vault/soroban/src/tests.rsVerification
RED evidence observed before fix:
cargo test -p templar-soroban-runtime test_governance_config_rejects_duplicate_address_lists -- --nocaptureOk(Ok(()))instead ofErr(Ok(InvalidInput)).cargo test -p templar-soroban-governance submit_set_supply_queue_rejects_duplicate_targets -- --nocaptureOk(1)instead ofErr(InvalidInput).GREEN verification:
cargo test -p templar-soroban-runtime test_governance_config_rejects_duplicate_address_lists -- --nocapturecargo test -p templar-soroban-runtime test_governance_config_empty_lists_keep_clear_semantics -- --nocapturecargo test -p templar-soroban-governance submit_set_supply_queue_rejects_duplicate_targets -- --nocapturecargo test -p templar-soroban-governance submit_set_supply_queue_allows_empty_clear_policy -- --nocapturecargo test -p templar-soroban-governance cap_action_is_timelocked_and_accepts_after_maturity -- --nocapturecargo test -p templar-soroban-runtime --lib -- --nocapturecargo test -p templar-soroban-governance -- --nocapturejust -f contract/vault/soroban/justfile size-budget-check93969 bytes (91.77 KiB) <= 131072 bytesjust -f contract/vault/soroban/justfile size-budget-check93969 bytesStack
Base:
audit/governance-abi-validation-a056/ PR #442.This change is