Rosemary is one of my favourite herbs for companion planting to benefit your garden and for use in the kitchen. The volatile oils that give rosemary its wonderfully distinctive scent include camphor, cineole, and pinene. These are concentrated in the needle-like leaves of the rosemary plant and they interfere with the host-finding and navigation ability of a range of common pests. They are also unpalatable to some larger garden pests and act as a deterrent to unwanted visitors that don't like the smell. Unfortunately, rosemary is not infallible, and there are some pests that love it.