Composting is a process of recycling food? as fertilisers, rather than disposing them. It is a natural function that happens with or without human intervention.
Kitchen and garden refuse will be tossed onto a pile in the garden. This pile is then left for a year and turned in with the existing soil. This produces a rich, non-contaminated soil.
The question of doubtfulness on the purity of the crop should not surface as the source of compost does not affect the purity and permissibility of consuming the crop.