Security updates for core and entity api