We have seen small bugs in white rice. If you have a lot to store it might be a good idea to put a piece of dry ice on top. The dry ice will sublimate and the CO2, being heavier, will displace the oxygen. After the ice is gone, then seal the container. The lack of air will keep the bugs away.
Now, I condemned rail cars full of grits that had been shipped back from Wheelus AFB, Libya to CONUS that were full of insects and didn't have a chance of recovery to wholesomeness.
The dry ice trick should be used on Beans, peas, and Pasta also. Nothing can keep the bugsout as the eggs are already there. One mystery is why cake Mixes don’t bug up. I was told by one clown that they put insecticide in them.
The old southern favorite of beans and rice balances the low protein content of white rice. I try to not have no survival food that requires freezer or refrigerator. Living on the TX gulf coast, we were without power for 28 days during Hurricane Rita. I was able to salvage the perishables by canning them.
Doomsayer I may be but I try to have at least 6 Mo food on hand. 1 year would be better. Expensive they may be but the freeze dried foods are good having a shelf life of 25 years. Dried foods or even canned foods maynot be as tasty as theymonce was but should be safe to eat if not obviously spoiled