Modal and non-modal perturbation growth in boundary layers subjected to time-harmonic spanwise wall motion are examined. The superposition of the streamwise Blasius flow and the spanwise Stokes layer can lead to strong modal amplification during intervals of the base-flow period. Linear stability analysis of frozen phases of the base state demonstrates that this growth is due to an inviscid instability, which is related to the inflection points of the spanwise Stokes layer. The generation of new inflection points at the wall and their propagation towards the free stream leads to mode crossing when tracing the most unstable mode as a function of phase. The fundamental mode computed in Floquet analysis has a considerably lower growth rate than the instantaneous eigenfunctions. Furthermore, the algebraic lift-up mechanism that causes the formation of Klebanoff streaks is examined in transient growth analyses. The wall forcing significantly weakens the wall-normal velocity perturbations associated with lift-up. This effect is attributed to the formation of a pressure field which redistributes energy from the wall-normal to the spanwise velocity perturbations. The results from linear theory explain observations from direct numerical simulations of breakdown to turbulence in the same flow configuration by Hack & Zaki (J. Fluid Mech., vol. 760, 2014a, pp. 63–94). When bypass mechanisms are dominant, the flow is stabilized due to the weaker non-modal growth. However, at high amplitudes of wall oscillation, transition is promoted due to fast growth of the modal instability.