The concern I'd have is not the details of the food per se, but some more practical concerns.
From what I see in the pictures, you have not a clean cabinet there, but one with various connections. If this were actually under a sink it would likely include the water turnoff; while you say this isn't actually directly under the sink, it clearly contains the plug for the dishwasher, some pipes across it, and what might be the diswasher water turnoff in the bottom right of the second picture.
Being able to access these in an emergency can be crucial to preventing further damage, whether it is water damage, fire, or other problems. In a restaurant, storing items there would be a code violation in most places for this reason.
These connections also mean you have holes in the cabinetry, which makes it much more likely that vermin of various sorts would get in. While airtight containers will help prevent this, unless you have perfect hygiene and clean regularly it's likely you will end up with vermin eventually here, more likely than other areas. In a residence this is up to you how that tradeoff is handled, but it's something to consider. I wouldn't consider this nearly the problem that the safety issue is.