-
Notifications
You must be signed in to change notification settings - Fork 38
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
[TD-1396] Immutable Signed Zone v2 Threat Model #206
Conversation
|
||
## Threat Model Scope | ||
|
||
The threat model is limited to the following Solidity files at GitHash [TBD]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the githash and link to browse files at that githash. That is needed, so people can understand what the threat model was based on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do once we've actioned code changes below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added links to githash
|
||
The threat model is limited to the following Solidity files at GitHash [TBD]: | ||
|
||
* [ImmutableSignedZoneV2.sol [TBD]]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put in the links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do once we've actioned code changes below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
* Default Admin | ||
* Creates and removes other administrators | ||
* First admin is assigned to the `address owner` param on the `constructor` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this owner related to linking the contract to an account in Immutable Hub? If so, it would be good to switch to what is being done in Assets / what they are moving towards, where the DEFAULT_ADMIN_ROLE just deals with role administration, and there is a HUB_OWNER_ROLE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our contract is intended to be deployed and managed by Immutable exclusively. Hub is not involved in this management.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The owner will be set to the multi-sig
* Default Admin | ||
* Creates and removes other administrators | ||
* First admin is assigned to the `address owner` param on the `constructor` | ||
* Call the following configuration functions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tasks should be controlled by a separate admin to the DEFAULT_ADMIN_ROLE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to a new ZONE_MANAGER_ROLE
|
||
* Grant can grant administrator roles to any account, including the `DEFAULT_ADMIN` role | ||
* Revoke `DEFAULT_ADMIN` role from any account | ||
* Renounce the `DEFAULT_ADMIN` role for itself, possibly leading to no administrators and loss of control of the contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the Renounce function be stopped from removing the last DEFAULT_ADMIN_ROLE? Assets have / are implementing this style of function in their code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actioned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates: revokeRole
and renounceRole
are now protected from removing the last DEFAULT_ADMIN_ROLE
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have put multiple comments in. Many of these comments are about the code as a whole, rather than the threat model itself.
9f49e27
to
21fe3d0
Compare
21fe3d0
to
44ae6b2
Compare
Threat model for Immutable Signed Zone v2.