I am not familiar with a worm in cedar. You should have an entomologist look at it for identification and then treat accordingly. A state college extension office should be able to help. If they are wood eating worms or larvae, then a borate treatment would be in order.