  Anderson's theorem states that non-magnetic impurities do not change the bulk
properties of conventional superconductors. However, as the dimensionality is
reduced, the effect of impurities becomes more significant. Here we investigate
superconducting nanowires with diameter less than the superconducting coherence
length by using a microscopic description based on the Bogoliubov-de Gennes
method. We find that: 1) impurities strongly affect the superconducting
properties, 2) the effect is impurity position-dependent, and 3) it exhibits
opposite behavior for resonant and off-resonant wire widths. We show that this
is due to the interplay between the shape resonances of the order parameter and
the sub-band energy spectrum induced by the lateral quantum confinement. These
effects can be used to manipulate the Josephson current, filter electrons by
subband and investigate the symmetries of the superconducting subbands.
