Check code for plagiarism from GitHub
When one student copies a public repository and nobody else in the class does, comparing the class with itself finds nothing: there is no second copy to match. Finding it means searching public code. This page explains what that search returns, where its limits are, and how to handle the awkward cases.
Checks every file against GitHub, Stack Overflow, the web, classmates and AI.
search.chw2/bsearch.cA binary search on its own proves nothing, since everyone writes it this way. The identical note to a TA (underlined) is different: it was written by one person, about one course, and it is in both files.
Why a class-only check misses it
Tools that compare submissions with each other answer one question: did two of these students hand in the same thing? That catches collusion. It says nothing about a student who worked alone and copied from outside the class.
The outside sources are easy to reach. Students post coursework to public repositories as a portfolio, often with the course code in the name. Assignments that are reused from term to term build up a public archive of solutions. A search for the assignment title is usually enough.
So a full check has two halves: every submission against every other, and every submission against public code. They find different things, and a clean result on one tells you nothing about the other. If you use a class-only tool today, this is what it leaves out.
What a GitHub match shows you
- The source. A link to the page the code was found on, so you can open the repository and see it in context.
- The matching lines. The submission next to the source, with the shared lines marked.
- A web score for the submission, separate from its score against classmates and its AI result. A submission can be clean on one and high on another.
Open the repository before you do anything else. Three things are worth a minute: who owns it, when the file was committed, and whether the rest of the repository is the same course. A repository named after your course, committed two terms ago, is a different situation from a general-purpose library the student was allowed to use.
The comparison is by structure, so renaming and reformatting the copied file does not hide it. The search runs against Codequiry's index of public code as well as the live web.
Check a submission against GitHub
Web matches link to the page the code was found on.
What no checker can find
It is worth being clear about the limits, because a clean web result is sometimes read as proof of original work. It is not.
- Private repositories. If the source is not public, it cannot be searched. This includes solutions passed around in a private repository or a shared drive.
- Code that was deleted or made private before it was ever indexed.
- Code written for the student by someone else. There is no original to match. This is where the peer comparison, the AI check and a conversation with the student do the work.
One partial exception: when two students copy from the same private source, the source stays invisible, but their submissions match each other.
When the match is the student's own repository
This happens more than you would expect, and it is usually innocent. The student pushed their work to GitHub while writing it, the repository is public, and the checker found it.
- Check the owner. Is the account plainly the student's?
- Check the dates. Commits spread over the days before the deadline look like someone working. A single commit of the finished project, after another student's repository already had it, does not.
- Check your policy. Matching yourself is not copying. Publishing solutions where the next cohort can find them may still be against your course rules, and it is fair to ask the student to make the repository private.
If your syllabus does not cover this yet, the collaboration policy template has a clause for public repositories.
When your assignment's solutions are public
- Check every submission against the web, every time. It turns a public solution from an invisible risk into something that is found.
- Ask the owner to take it private. Most former students do so when asked politely. A short issue on the repository is enough.
- Change the assignment a little each term. A different data format, a renamed interface or one new requirement means last year's solution no longer passes, and a copy of it stands out.
- Tell students you check. A sentence in the syllabus saying submissions are compared with public code prevents more copying than it catches.
Frequently asked questions
How do I check if code was copied from GitHub?
Run the submission through a checker that searches public code, not only the rest of the class. A web match shows the page the code was found on and the lines that match, so you can open the repository and compare it yourself.
Can it find code copied from a private repository?
No. Nothing can search a repository that is not public. A copy from a private repository can still surface another way: if two students used the same private source, their submissions match each other.
What if the student changed the variable names?
A renamed and reformatted copy still matches, because the comparison is by structure and not by text.
The match is to the student's own GitHub repository. Is that plagiarism?
Usually not. Check the repository owner and the commit dates. A student who pushed their own work before the deadline has matched themselves. Whether posting solutions publicly is allowed is a separate question for your course policy.
Does it only search GitHub?
No. The web check also covers Stack Overflow and the indexed web, and each match links to its source.
My assignment's solutions are public. What can I do?
Check every submission against the web so copies are found, ask the repository owner to make it private, and change the assignment enough each term that an old solution no longer fits.
Find out what came from GitHub
Every submission against public code, classmates and AI, with a link to each source.
Get started Every plan includes Deep Scans.