How do I classify whether a document is legal or not given a set of keywords that appear only in legal documents?
Maybe this is what you are looking for:
https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm
Basically you would

build and store a finite-state machine that resembles a trie with additional links between the various internal nodes using the given keywords.
for the candidate document, go through it with the above finite-state machine.

Then based on the result

If there is any match, then the document is valid.
Otherwise it is possible that the document is invalid. However, in terms of the probability, I do not have any good idea yet.