Open source is too wide to use here. There are many OS licences. In this case, there is OS that allows anybody to do anything with the code (including selling it), and there are licences that do not allow re-selling of the code or proprietary derivative works.
I don't think GitHub would break those licences. So I believe it's just a matter of choosing a right licence for your code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Open source is too wide to use here. There are many OS licences. In this case, there is OS that allows anybody to do anything with the code (including selling it), and there are licences that do not allow re-selling of the code or proprietary derivative works.
I don't think GitHub would break those licences. So I believe it's just a matter of choosing a right licence for your code.