Yes, but normally you get to inspect that code before compiling and executing if you wish to.
So basically be careful about who is given commit rights. Also, might be a good idea (if you're just running the software instead of working on it) to just pick a recent (signed) tag.