It should eat a variety of starches and veggies. Ideally i would offer it unsalted sunflower seeds, or something similar, and a few chunks of carrot, and possibley a chunk of dog food for protein if you have it. Remove items that get moldy. The beetle could live for many years with relatively little care, given the right conditions. If the insect you have found looks like a Coreid but with four legs, then it might be an assasin bug.
All insects have six legs in the adult stage, no exceptions.
But sometimes those front legs are modified. Assasin bugs often hold their front legs up against the body and so appear to only have four legs. I would suggest if you are still curious that you look in a field guide or two for some fo the details that distinguish Coreids from Reduivuuds and other members of the Hemiptera.