For a vegan, store-bought pasta isn’t so straightforward since some brands contain eggs or dairy. If your diet is plant-based, it's best to keep a checklist of fail-safes.
Many pastas in the refrigerated section contain eggs, so check the label. Dried pasta will usually have semolina flour, water, and little else, but still make sure to check.
Pasta brands like Barilla, De Cecco, and Colvita have many vegan pasta options with a few outliers. There are also several kinds of pasta made with bean flour.
One fail-safe method is checking for the certified vegan logo: a "V" wrapped in a heart. However, just because a pasta doesn't have the logo doesn't mean it's not vegan.