CoSn is a Pauli paramagnet with relatively flat d-bands centered about 100 meV below the Fermi energy Ef. Single crystals of CoSn lightly doped with Fe, In, or Ni are investigated using x-ray and neutron scattering, magnetic susceptibility and magnetization, ac susceptibility, specific heat and resistivity measurements. Within the rigid band approximation, hole doping with a few percent of Fe or In should move the flat bands closer to Ef, whereas electron doping with Ni should move the flat bands further away from Ef. We provide evidence that this indeed occurs. Fe and In doping drive CoSn toward magnetism, while Ni doping suppresses CoSns already weak magnetic response. The resulting ground state is different for Fe versus In doping. For Fe-doped crystals, Co1-xFexSn, with 0.02 < x < 0.27, the magnetic and specific heat data are consistent with the formation of a spin glass, with a glass transition temperature, Tg, ranging from 1 K for x=0.02 to 10 K for x= 0.27. Powder and single crystal neutron diffraction found no evidence of long-range magnetic order below Tg with x = 0.17. For In-doped crystals, CoSn1-yIny, both the magnetic susceptibility and the Sommerfeld coefficient, gamma, increase substantially relative to pure CoSn, but with no clear indication of a magnetic transition for 0.05 < y < 0.2. CoSn crystals doped with Ni (Co0.93Ni0.07Sn) have a significantly smaller magnetic susceptibility and gamma than pure CoSn, consistent with the flat bands further from Ef.