Entrapment law in the US does not mean that undercover officers have to tell you they are cops- even if you ask them flat out. Police have every right to lie to you about anything, at any time, undercover or not. What they can’t do is invite or persuade you to commit a crime you wouldn’t have considered under normal circumstances. Source Source 2 Source 3