Skip to content

Slither considers constructors as a taint source #404

Open
@priyankabose

Description

@priyankabose
contract SlitherTaintBug {

    uint count;
    constructor (uint _count) public {
        count = _count;
        
    }

    function deposit() public payable {

        uint local_count = count;
    }

    
}

If I use slither's slither.analyses.data_dependency.data_dependency.is_tainted() with local_count as the variable and contract as context. It will output true. Is that intended?

According to my understanding, constructors are deployed by a contract owner. Hence, any variable declared by arguments of constructors within a constructor is done by the owner. So, it is can not be external user-controlled. Right?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions