Your compost shouldn't have any insect sneaking through, but the lids won't possibly keep the tiniest of them out. The presence of ants won't cause any harm. Rather, it indicates that the compost is a bit dry and might need a little moisture.