Is 用人单位未依法为劳动者缴纳社会保险费的, from a Contract of Employment, ambiguous?
未 actually attaches to 缴纳. 依法 is an adverb here that also attaches to 缴纳, and mostly still an adverb in other places, meaning a certain interest, requirement or enforcement is specified in and/or supported by national law. It's related to but not "legal," which corresponds to 合法. 

This whole sentence can be translated into the following:


  (When) The employer fails to pay social insurance for the employee, which is required by law.


Disclaimer: I have not been trained in law settings.