Earlier quoted context omitted.
cheating was absolutely rampant when I was in college getting my CS degree. and that was with tests taken in person with the professor in the room! I'm sure students are even more brazen when all assignments are done at home. I think at the very least, all exams ought to be designed as "open book" with a time limit. that at least eliminates the issue of students using unauthorized resources. I'm not sure what can be…
With a CS degree a better solution is make it project based. Even if someone uses code found somewhere, just changing it up to not be obvious, that's not that different than actual industry, AND means they had to understand it at some level. And that's for stuff they -can- search for (such as 'implement a data structure/algorithm').
The best however, is a 1:1 code review with a TA or Prof. Randomly jumping to files, reading the code and asking questions about it. Extremely hard to copy a codebase and learn it well enough you can explain it but really easy to do if you wrote it yourself.