In this work, the effects of an endohedral cavity on the hydrogen dipole oscillator strength sum rule, S k , and its logarithmic version, L k , are studied. The approach is based on a finite-differences numerical solution to the Schrödinger equation for the hydrogen atom spectrum under a cavity confinement model. Endohedral effects are accounted for by means of a shell-like cavity of inner radius R 0 and thickness ∆ with a penetrable potential height V 0. To analyze the cavity discontinuity, a Woods-Saxon potential is used for different values of the smoothness at the inner and outer cavity radii. Small values of the smoothness parameter allows one to emulate the discontinuity of a square-well model potential. The dipole oscillator strength sum rules S k and L k are investigated as a function of the cavity potential depth V 0. We use the values of R 0 and ∆ that describe a fullerene cage. One finds that the sum rules are fulfilled within the numerical precision for low potential height conditions. However, when the well depth is V 0 = 0.7 a.u., corresponding to the first avoiding crossing between the 1s and 2s state, the sum rule differs from its closure relation and it is this well depth for which the effects of the potential discontinuity are strongest. As the S −2 sum rule is the static dipole polarizability, the results are compared to available data in the literature showing excellent agreement. We also show that inclusion of all bound and continuum excited states in the sum over states are necessary in order to obtain accurate sum rules.