Assessment reports>Security Policy>Threat Model>checkSetupAndEnableModule

Function: checkSetupAndEnableModule(address None, byte[] None)

This instructs the SA to install the module and return the address.

Inputs

  • setupContract

    • Control: Full.

    • Constraints: Must be a valid address.

    • Impact: Address of the setupContract.

  • setupData

    • Control: Full.

    • Constraints: Must be valid calldata.

    • Impact: Calldata for the sa.setupAndEnableModule call.

Branches and code coverage (including function calls)

Intended branches

  • Validates the module against the registry using the check* functions.

  • Calls the ModuleManager, calling execTransactionFromModule -> enableModule.

Negative behavior

  • Should revert if the security policy is not satisfied.

  • Should revert if the module is not a contract.

  • Should revert if ExecTxFromModule fails.

  • Should revert if setup fails.

Function call analysis

  • _module.isContract()

    • What is controllable? _module.

    • If return value controllable, how is it used and how can it go wrong? Is a contract.

    • What happens if it reverts, reenters, or does other unusual control flow? N/A.

  • call(gas(), caller()...)

    • What is controllable? Everything except the calldata used for the call to execTranscationFromModule.

    • If return value controllable, how is it used and how can it go wrong? N/A.

    • What happens if it reverts, reenters, or does other unusual control flow? N/A.

Zellic © 2024Back to top ↑