Cedar is a lot worse than most pine. But both have oils that irritate nasal & lung membranes, etc. so you wouldn't want to use wood shavings as bedding for snakes.
A sturdy old dresser that has been around for years is a good choice*, especially once it's totally sealed (waterproofed). *Better than starting with unfinished wood &
staining that, since stains are normally quite volatile for a long time. (they off-gas toxic vapors)
Don't forget that plenty of snakes live in & around forests full of pine & other trees...but there's plenty of fresh air too. It's when you keep snakes in enclosed spaces-
typical of what's used for BPs that need air restriction to keep enough warmth in, so even a small amount of off-gassing causes more harm. I'm mostly a colubrid keeper
& I prefer to use glass tanks with screen tops, ie. all have good ventilation. I'm not inclined to use wood shavings at all (I don't even care for aspen, though it's safe) but
if I were, pine would probably not be a problem, or only a slight one, whereas cedar still would be. But for safety & best practices, it's just better that we say "don't use
pine & cedar" around snakes & other herps at all. An old dresser that's sealed (coated with no-VOC water-proofing) & totally dry before housing a beardie should be fine.