We've had the "free movement of persons" with the EU for over ten years now in Switzerland ! [1] And yes social security and other social insurances are also valid for EU people working in Switzerland.[2]
[1] https://www.bfm.admin.ch/content/bfm/en/home/themen/fza_schw...
[2] http://www.bsv.admin.ch/soziale_sicherheit/index.html?lang=e...