Keep in mind the following:
When asked directly, an officer of the State/Federal executive branch in the United States cannot lie as to their oath. They do not have do respond, directly, but you have options.
That means, an undercover officer or other duly sworn officer MAY give deflecting information as to their position BUT, they cannot say a definite NO to your direct question as to whether they are a police/peace officer.
If you ask, “Are you a re police officer?” and that person replies, “Do I look like a police office?”. That person is a cop.
In the end, that officer CAN NOT say, “No, I’m not a police officer.” That will end up in ENTRAPMENT.
Can you cite the basis for this? Any legal precedents or rulings? Cuz I don’t think so.
Urban myth. They can lie about anything, and they do. After all, they are from the government.