As far as we know, most herbsyour rosemary, thyme, basil and dillare safe for cats and dogs, but there is one that frequently colors a person's garden that can cause a sometimes severeand definitely strange illness.
As for fruits and vegetables, tomatoes (particularly the leaves) can be toxic to dogs and cats.