Lots of dessicant in safes.
I collect it if i ever see it. hell im so bad I saw a pouch on the floor at 'Good Different' today & bent over to pick it up
It all dries out over summer, & if unsure just chuck it outside on a warm day in the sun with low humidity.
Aside from that, what scj said is the ultimate. being grease.
I use lanolin. I have a tub of lanolin grease & ive melted a glob of that down & mixed with alcohol, squirt on a rag & wipe down--beeyoodifool.!
It stays there!!
Or just a aerosol can of a lanolin spray will do ya. I like it because once the dispersant/carrier has dispersed, lanolin is actually a grease & sticks without running

Unlike many oils do.
And just to add--as said just above ^^, every year i pull the stocks off, clean all the steel off & rub a coat of lanolin grease (only very thin) over all the areas covered by the stock & all under scope where its hard to get to.
Im not sure if its any good, but thats also the grease i use on my bolt lugs--happy to be told to stop doing that if its not a good idea for any reason.