We discuss the formation of spectral features in the decelerating ejecta of gamma-ray bursts, including the possible effect of inhomogeneities. These should lead to blueshifted and broadened absorption edges and resonant features, especially from H and He. An external neutral ISM could produce detectable H and He, as well as Fe X-ray absorption edges and lines. Hypernova scenarios may be diagnosed by Fe K-$alpha$ and H Ly-$alpha$ emission lines.