Is there a way to safely can pesto sauce?
I've never seen canned pesto, nor do I know if there is a way to do it safely. I will propose an alternate solution. Have you thought about freezing it? I've had pesto given to me as a gift before, but it was made as normal then frozen in a canning jar. It worked great.

Did some more digging and eventually came across this, from the National Center for Home Food Preservation. In summary, the oil and herb mixture is too low of an acid to prevent development of nasty bacteria.

See similar questions regarding storing/canning stuff in oil for more about why it might be dangerous:
 - Garlic Infused Oil
 - Peppers and Oil