I applied to the CIA when I was looking at finishing grad school about 4 years back. As with the FBI, one of the things they mentioned was illegal downloading, of which I had done quite a bit while in college. I mean, we're talking hundreds of films, thousands of TV episodes, thousands of audio tracks, both foreign and domestic for all of those, from any number of decades, genres, and budget sizes.
I was upfront with them about it during a pre-screening interview held at my school's campus. I actually brought it up with them and asked if it'd be a problem. They indicated it wouldn't be, and formally invited me to fill out a proper application with them so that they could advance me through the process.
I answered truthfully regarding it on the application and any subsequent questionnaires that I had to fill out. I never got any word back regarding that specifically, but their response was to ask me to fly up to Washington D.C. for a three-day session with them, which I did.
I provided exacting details regarding my illegal downloading to the polygraph examiner at my polygraph session, as well as to anyone else who asked about it. I let them know the quantity, nature of the content, and how recently I had engaged in it. I passed the polygraph with flying colors and was told I didn't even need to come in for the second session they had scheduled since they were confident I told the truth about everything (and I had...in excruciating detail, in fact, just because I knew, being the pedant that I am, that if I left out any little detail, I really would be considering myself to be lying; as an aside, one of the other applicants I was hanging out with lied to them about the recency of his drug use and got caught in his lie).
And how did they respond to all of this? They asked me when it would be convenient to move on to the final stage of the application process (a thorough background check...which I'm confident I would have easily passed), since the folks I'd be working with were excited about bringing me onboard and wanted to keep things moving. Which is to say, the fact that I had downloaded loads of files illegally in the past clearly wasn't a problem. They let me know that it'd need to stop and that it would come up again in the every-five-years polygraph everyone working there submits to, but otherwise, they made it clear to me, both explicitly through their words and implicitly through their deeds that they really didn't have a problem with me having engaged in it at a relatively large scale in the past.
P.S. Just to state what I hope is obvious: an actual polygraph session is NOTHING like what is shown on TV (the room was well-lit, there wasn't an angry detective yelling at me, beads of sweat were not pouring from my brow, and no one was pounding on any desks). I don't want to get into a load of details, but suffice it to say, the environment was heavily controlled to eliminate external stimuli, the questions and their meanings along with the terms and their definitions were all explained in detail to me in advance, I was able to voice any misgivings I had about them to the examiner (in fact, we spent 2.5 hours of the 4 hours doing just that, since my inherent pedantry meant that I had all sorts of ideas like "well, technically I've compromised government systems when I lent a friend my password at our state university" or "I can't rule out the possibility that I unknowingly supported terrorists through a front that they're maintaining", which led to a lot of the questions getting rephrased to be prefixed by "insofar as you know" or "besides what you have disclosed here"), and the questions were all read to me over and over and over again in even, metered tones that were about as un-aggressive as you can imagine.