Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audit] 4. Missing validation of submission policy during contract migration #866

Merged
merged 2 commits into from
Aug 11, 2024

Conversation

NoahSaso
Copy link
Member

@NoahSaso NoahSaso commented Aug 2, 2024

From Oak:

In packages/dao-pre-propose-base/src/execute.rs:670, the migrate function allows the contract migration admin to set the PreProposeSubmissionPolicy when updating the contract. However, no validation ensures the supplied policy does not accidentally lock the DAO due to an invalid configuration.

We classify this issue as minor because it can only caused by the contract migration admin, which is a privileged account.

This fix adds validation to the migration.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.65%. Comparing base (75272b9) to head (1d4d2ca).

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #866   +/-   ##
============================================
  Coverage        96.64%   96.65%           
============================================
  Files              240      240           
  Lines            65294    65296    +2     
============================================
+ Hits             63106    63109    +3     
+ Misses            2188     2187    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bekauz bekauz merged commit c94194c into development Aug 11, 2024
8 of 9 checks passed
@bekauz bekauz deleted the noah/rewards-audit-fix-4 branch August 11, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants