Add Slither reentrancy check in CI (#3047)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
JulissaDantes
2022-01-20 20:15:54 -04:00
committed by GitHub
parent 783ac759a9
commit b3b83b558e
5 changed files with 35 additions and 2 deletions

View File

@ -261,6 +261,9 @@ contract TimelockController is AccessControl {
*
* - the caller must have the 'executor' role.
*/
// This function can reenter, but it doesn't pose a risk because _afterCall checks that the proposal is pending,
// thus any modifications to the operation during reentrancy should be caught.
// slither-disable-next-line reentrancy-eth
function execute(
address target,
uint256 value,

View File

@ -122,6 +122,9 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
* @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
* been queued.
*/
// This function can reenter through the external call to the timelock, but we assume the timelock is trusted and
// well behaved (according to TimelockController) and this will not happen.
// slither-disable-next-line reentrancy-no-eth
function _cancel(
address[] memory targets,
uint256[] memory values,

View File

@ -56,6 +56,9 @@ abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender {
* @param data An arbitrary datafield that is passed to the receiver.
* @return `true` is the flash loan was successful.
*/
// This function can reenter, but it doesn't pose a risk because it always preserves the property that the amount
// minted at the beginning is always recovered and burned at the end, or else the entire function will revert.
// slither-disable-next-line reentrancy-no-eth
function flashLoan(
IERC3156FlashBorrower receiver,
address token,