This is a known problem with intruders. There are two different causes; internal and external.
Take your gas cap off, and shake it around by your ear. Do you hear anything? If not, then your gas cap is vibrating from side to side in the fuel filler hole. Find a piece of rubber and cut out a gasket to fit between the filler neck and the cap, and put it behind the factory one. Done.
If you hear anything rattle, then flip the cap over and remove the two philips head screws. Remove the black housing from the cap. Remove the brass washer/ spacer from the cap. You will see a brass housing with the lock cylinder in it. In this housing there are two small holes, one with a plug in it that has a very small hole in it. Use a sharp nail to pry off this plug, and remove and discard the small metal ball under the plug. This ball is supposed to keep fuel from dripping out the vent hole if you flip your bike over, and it is the source of the rattle. Put the cap back together without the ball, and no more rattle.