Unfortunately, there’s no certain way to stop sap when it’s determined to ooze out of wood. And the problem is always most pronounced with outdoor wood in sunny locations. The cycles of warming and cooling seem to drive the sap out more often and for longer periods of time. I’ve even seen sap continue to ooze from thick posts 10 years after construction. If your siding is due to be painted, use a stain blocking primer such as Zinsser B-I-N on the knots first, followed by paint. Even still, you can’t count on complete effectiveness in outdoor applications. The best remedial solution I’ve found involves scraping off hardened sap periodically, then wiping the area down with a rag soaked in turpentine.