If the level of cyanide was of a low dose that wouldn’t affect you unless you ate it twice a day for ten years, yeah, it’d be not only legal, but it is COMMON today. If you’re afraid of it, never ever eat peach ice cream. The body processes small amounts of cyanide without harm.
It might be legal, but that doesn’t mean I wouldn’t be liable. They are two separate things.