Selling is an automatic disqualifier (as you showed you are willing to commit a crime for money).
Past usage is not an automatic disqualifier, and shouldn't be a problem if it was years ago. Lying is an automatic disqualifier, if you get caught (and perjury if they decide to pursue).
However, it is of my opinion that you should only selectively share information, and only the information that they are likely to learn in background checks.
I had a security clearance about a decade ago, and know many others who received them and other who were denied. The ones who were completely honest were denied. However, this was also immediately after college, so there wasn't ten years of clean living in between. (This circle of friends also experimented with pretty much every substance available during college.)
Getting cleared to CONFIDENTIAL is easy. SECRET involves a background check and filling out the SF-86 form [2].
In some ways, the higher clearances (TOP SECRET, SENSITIVE COMPARTMENTED INFORMATION) are easier. It's not a checklist thing at the higher levels. You get to discuss problems. There are long interviews, lie detector tests, checks of original records, and interviews of people in your past. The FBI used to do this work, but I think it's outsourced now. The current processing time for a TS clearance is about a year.
(It's been decades since I was in that world, but I've held clearances.)
[1] http://www.military.com/veteran-jobs/security-clearance-jobs... [2] https://www.opm.gov/forms/pdf_fill/sf86-non508.pdf
There are few things that automatically DQ you, for which you can't get a waiver - I guess, I never needed a waiver. Just admit all your drugs, whoring, improprieties, and deviant thoughts. They've seen worse.
Of course, admitting that means they leave you in a DB for years, keep the DB online, let it get breached, and then give you credit monitoring and a form letter.
They want the list of people who can pressure you to be non-existant or incredibly small.