Sort:  

Good question, but I think maybe you never downloading stuff from Github. To make sure the executables/programs you download from Github is safe, first you have to make sure the link is provided by the authority or trusted party.

What if the you cannot trust the party? You don't have to.

Access the Github repository, audit all the source code yourself. Don't download the ready-made executable, but download all the source code and compile it yourself(there will be a guide in the README generally). This is the ultimate way of safety checking.

Oh...sounds to complicated for me. I wanted to download jsecoin android mining ap but I am afraid of scams

Trust the authority or audit the code. That's the ways I could suggest.