The problem with keeping your flour and rice or anything for that matter that you truly will depend on is what if the power goes out for a extended lenght of time?
Right now, even if I stored it in my garage (well-sealed, of course), it would not thaw until March some time. Usually, our power goes out in the winter, with ice on the power lines, etc., rather than in the summer. And once the little “friends” inside the rice and flour have been sufficiently frozen, they’re less likely to make an appearance after thawing.
Whatever flour that I do keep out, I put a few whole bay leaves in it. I haven’t had any problems since I started doing that.