Food security is a manipulative political code phrase designed to scare people and thereby make them support agricultural subsidies, as I have written before. The fear is created by association with sieges before the age of gunpowder, where castles were starved into submission. In modern times, no enemy is silly enough to try to surround and starve a country that is not a city state (e.g. Singapore), because any enemy with a large enough force to prevent food from getting into a country is also strong enough to conquer it quickly by frontal attack. Even unintentional starvation is a public relations disaster (e.g. Yemen), as is a war that drags on, but a quick takeover without too many casualties (e.g. Crimea) actually increases the conqueror’s leader’s popularity in internal politics.
Even if an enemy was stupid and tried to starve a country, the defense against this is not farm subsidies, but many distributed small stockpiles of food. Farms as a food supply are easy to destroy by firebombing the crops and livestock from the air. A small number of large centralised stockpiles are also vulnerable. However, if each household is obliged to keep n months’ worth of non-perishable food at home, then starving the country into submission would take at least n months and bombardment would not shorten that period.
What is really meant by food security is that food prices might rise. However, in all except the very poorest countries in the world, food is so cheap that any reasonable price rise would not cause starvation. For example, according to the USDA, 9 medium baked potatoes fulfill all the nutritional needs of an adult. Similarly, people can survive for a long time eating just wheat flour and water. Wheat flour is 80 cents per kilo, and a kilo of it has 3600 kcal, which is enough for an adult for two days. The price of flour would have to rise at least a hundred times for the cost to lead to starvation in developed countries. Other emergency foods that do not go bad and can be prepared without heating are also cheap, e.g. milk powder, instant oatmeal, canned meats and vegetables.
A price rise is a financial problem, not not a real resource constraint, and as such has a financial solution – insurance. Those afraid of a price rise can use forward contracts to lock in the price. Insurance against a very low-probability event like food prices rising a hundred times is cheap (if such insurance is offered, which it might not be due to the low demand).