I thought it'd be fairly easy to find a list of Sanskrit consonant clusters online, but the last hour or so has proved me wrong. There's information out there about how to write conjoined consonants in various scripts, and also about consonant sandhi, but I haven't found anything that tells me what combinations are allowed in the first place. Can anyone point me to something along those lines?
This book seems to answer your question in great detail. From the Amazon description:
This scholarly treatise designed for linguists and typographers contains comprehensive statistics of conjunct consonants of the Sanskrit language, sorted by alphabet and by frequency with quotations from original Sanskrit texts. The linguistic statistics prove which consonantal sound combinations actually occur in Sanskrit
There is a preview available online, which does not give a comprehensive list as far as I can tell, but may still be useful to you.
The answer is implicit in grammars like Whitney's Sanskrit Grammar, which provide sandhi rules (internal and external). For example /c+s/ → [kṣ] (standard transliteration). This does not tell you which clusters are unattested, it tells you how clusters are changed if they are changed. Word-internally, voiceless aspirates never stand before obstruents at any level, whereas voiced aspirates do and trigger Bartholomae's law (transfer of aspiration and voicing) before stops, or deaspirate and devoice before fricatives (or when BL fails, in zero-grade forms of dhā-). I suspect that word-internal [pk] is unattested, because it would not arise by affixation and roots are fundamentally monosyllabic, but above the level of the word it ought to arise.
In other words, the answer is computable, but it's not trivial.
This page has several really extensive lists of Sanskrit conjunct consonants Devanagari aksharas taken from some of the famous Sanskrit grammars and dictionaries, up to 5 consonants in a row. Some of the conjuncts are real monsters like ṅkshṇva or rddhrya which are apparently hapax legomena. I am afraid no exhaustive list is possible, for if a poet decided to create a shocking conjunct to be used in just a single verse, no one will bother to add it to grammars or textbooks, or computer fonts. (UPD: The book TKR refers to in his answer confirms that many of the conjuncts in those lists are fictitious and do not appear in any Sanskrit word or text.)