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

[TD-1396] Immutable Signed Zone v2 Threat Model #206

Merged
merged 8 commits into from
Apr 23, 2024

Conversation

lfportal
Copy link
Contributor

@lfportal lfportal commented Apr 16, 2024

Threat model for Immutable Signed Zone v2.

@lfportal lfportal marked this pull request as ready for review April 17, 2024 12:07
@lfportal lfportal requested a review from a team as a code owner April 17, 2024 12:07
@lfportal lfportal requested review from drinkcoffee and rytimx April 17, 2024 12:09

## Threat Model Scope

The threat model is limited to the following Solidity files at GitHash [TBD]:
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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]]()
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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`
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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:
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actioned

Copy link
Contributor Author

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.

Copy link
Contributor

@drinkcoffee drinkcoffee left a 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.

@lfportal lfportal force-pushed the TD-1396-immutable-signed-zone-v2-threat-model branch from 9f49e27 to 21fe3d0 Compare April 22, 2024 12:24
@lfportal lfportal force-pushed the TD-1396-immutable-signed-zone-v2-threat-model branch from 21fe3d0 to 44ae6b2 Compare April 22, 2024 23:53
@lfportal lfportal merged commit d3db1b1 into main Apr 23, 2024
6 of 7 checks passed
@lfportal lfportal deleted the TD-1396-immutable-signed-zone-v2-threat-model branch April 23, 2024 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants