Treating pine to prevent oil leaking
I've used water-based varnish to seal in resin leaking from pine in a bed base I made.  I applied several coats to the whole surface, but started with a couple of coats over just the sticky areas.  Before the first coat I scraped/sanded the surface and cleaned with methylated spirits (denatured alcohol).

This won't work well if it's actually oil that's leaking.  Pine can be oiled, including with vegetable oil for food use.  Most varnishes, even oil-based ones, won't work too well on top of this.  You may be able to remove a lot of the oil with meths though.  Drying it in an oven may also help.  Not too hot, and not if other areas are painted or glued, or have plastic fixings.