Krebs on Security looks at all the scary personal information contained in your boarding pass and recommends “[t]he next time you’re thinking of throwing away a used boarding pass with a barcode on it, consider tossing the boarding pass into a document shredder instead.”
My advice might be different, to just use a mobile boarding pass and then there’s no need for a shredder. But I don’t actually think the barcode is the problem here.