The security services sees all aspects of huminity and are the most understanding employers. Basically, all they really want to verify it that you are not lying to them and will not get them into hot water later …
Mostly, they just don't care what filth you have rolled yourself in, unless for some specific transgressions related to our current crop of adversaries and some straigh-up criminal acts*. If you indeed did do some dodgy and frowned-upon by "society" things, then they just have more gurantees for your loyalty, by documenting it all in your service record.
*) Looking at the UK, one could be lead to assume that being a pedo is not one of the "prohibited sports".