The bill would codify protections for undocumented immigrants found in a directive issued by the Attorney General's Office in 2018.