While there are guidelines in the form of an unclassified, gov't-hosted desk reference [1] ultimate discretion seems to be left to adjudicators. There are public archives [2] that talk about such decisions made in tricky cases of criminal activity, financial malfeasance, potential blackmail, etc. I've seen at least one where somebody admitted to doing hard drugs while having a clearance and actually got upgraded to a TS (though this was ~10 years ago and I can't find it via search engine).
After he did a $1 million lottery a day only for Registered Republicans, to bypass pay for registration laws, in a swing state during the election.. I'm guessing any leftovers of that will be lifted.
[1] https://www.dhra.mil/portals/52/documents/perserec/adr_versi...
[2] https://doha.ogc.osd.mil/Industrial-Security-Program/Industr...