Most likely, dirt or sand from the leafy greens was not thoroughly washed off. There's not much you can do to fix this once the pesto is made.