this is the way:
get a pair of baseball sliding shorts with the cup pocket, or just a jock strap with the cup pocket. layer some more underwear over it.
throw the bag of weed in there an your good to go. security cannot fondle your sack, so its pretty safe in there.
use 5-6 plactic baggies to hold the weed in. and wash your hands after everytime you seal 1 of the bags to minimize transfer of trace material.
if you are really spooked, line a few of the bags with vaseline.
Overall its pretty much all good. dont draw attention to yourself(dont look like a stoner, and dont wear baggy clothes because you will get frisked), and make sure you are completely comfy with how airport security works before you do it.
I learned the ins and outs of the airport security experience by acting super suspicious and pushing boundaries when i didnt have anything on me, so when i did i knew what not to do, and what all the possible outcomes could be.