Anytime you add fresh ingredients to your soap, such as herbs, fruit, vegetables, flowers, milk, etc... they have the potential of going bad...even in cold process soap. They will last a long time but not indefinitely like most cold process soaps. Unfortunately, there's nothing you can add to the soap to prevent fresh ingredients from going bad.
This shouldn't discourage you from adding fresh ingredients to your soap. Some fruits and veggies have antioxidant properties that are very appealing. It can also add some texture to the soap (depending on what you add). You simply need to be aware that your soap will have an altered lifespan once these ingredients are added.
We have also found that all plant matter, once added to soap, will turn brown except for Calendula petals which do maintain their yellow coloration.
Here’s a recipe where we use fresh pumpkin:
In the Pumpkin Soap Recipe, the high pH of the lye neutralizes the fresh pumpkin exceedingly well so you should get a good 1 year shelf life out of this soap. Some other fresh ingredients we use are almonds, calendula, coffee, and chocolate.
Here is a recipe for using almonds, chocolate and lavender in soap: