When I was a kid we'd occasionally get a box of cereal or some flour with weevils in it, and finding them in your beans is nothing like finding them in a half eaten bowl of cereal.
It was miller moths for us, or more accurately their larva. It's how I learned not to eat any cereal that had fallen outside of the inner bag, no matter HOW little was left inside. Mueslix with little white wriggling worms in it is not fun (though possibly some extra protein).
As for beans, there was my ordeal that started when one of the people I buy from found out about my interest in actually GROWING Bambarra groundnuts (as opposed to simply eating them, which is what most people were buying them from him for.) and offered me a bag he had picked up in Mali (as opposed to Ghana, like his normal stock.) for free because it had some insect damage. I said sure (I could pick the good seed out and plant it, and thus widen my gene base.)
Well, I got it, and boy had it been ravaged. I must have lost 4/5 of the bag getting the eaten seeds out.
It was, however, at this point, I discovered the big problem, that a fair number of the weevils that had caused the problem were still ALIVE in there, and, being able to fly, quite a few of them managed to escape my fingers and establish themselves IN MY ROOM, feeding on loose groundnuts I had scattered around (fortunately, these weevil species seem to be species specific, so they couldn't transfer to any of the other loose seed, like the lablab beans [which have their own weevil*]. It took me MONTHS to get rid of them, by basically tossing out any groundnuts that weren't boxed up (fortunately, the non boxed up stuff was white "junk" material I was just using for germination tests before working with the ones I actually wanted to grow.
I also had to deal with the WEEVILS parasites, some sort of tiny fly (at least, I saw a lot of tiny flies come out of the bags, and since I know of no sort of fly that eats beans, I have to assume they were eating the weevils.)
*As I kid, I even encountered a kind of bean weevil with strong enough jaws to handle living in, and getting out, of a seed of New Guinea Creeper (
Mucuna benetti) which has such a thick seed coat you need a HAMMER to break it.