Covert operation
US law: Under US law, the Central Intelligence Agency (CIA) must lead covert operations unless the president finds that another agency should do so and informs Congress. The CIA's authority to conduct covert action comes from the National Security Act of 1947. President Ronald Reagan issued Executive Order 12333 titled United States Intelligence Activities in 1984. This order defined covert action as "special activities", both political and military, that the US Government could legally deny. The CIA was also designated as the sole authority under the 1991 Intelligence Authorization Act and in Title 50 of the United States Code Section 413(e). The CIA must have a "Presidential Finding" issued by the President in order to conduct these activities under the Hughes-Ryan amendment to the 1991 Intelligence Authorization Act. These findings are then monitored by the oversight committees in both the US Senate and House of Representatives. As a result of this framework, the CIA "receives more oversight from the Congress than any other agency in the federal government", according to one author. The Special Activities Division (SAD) is a division of the CIA's Directorate of Operations, responsible for Covert Action and "Special Activities". These special activities include covert political influence and paramilitary operations.

Impact: According to a 2018 study by University of Chicago political scientist Austin Carson, covert operations may have the beneficial effect of preventing escalation of disputes into full-blown wars. He argues that keeping military operations secret can limit escalation dynamics, as well as insulate leaders from domestic pressures while simultaneously allowing them communicating their interest to the adversary in keeping a war contained. He finds that covert operations are frequently detected by other major powers.

Domestic settings: To go "undercover" (that is, to go on an undercover operation) is to avoid detection by the object of one's observation, and especially to disguise one's own identity (or use an assumed identity) for the purposes of gaining the trust of an individual or organization in order to learn or confirm confidential information, or to gain the trust of targeted individuals to gather information or evidence. Undercover operations are traditionally employed by law enforcement agencies and private investigators; those in such roles are commonly referred to as undercover agents.

History: Law enforcement has carried out undercover work in a variety of ways throughout the course of history, but Eugène François Vidocq (1775–1857) developed the first organized (though informal) undercover program in France in the early 19th century, from the late First Empire through most of the Bourbon Restoration period of 1814 to 1830. At the end of 1811 Vidocq set up an informal plainclothes unit, the Brigade de la Sûreté ("Security Brigade"), which was later converted to a security police unit under the Prefecture of Police. The Sûreté initially had eight, then twelve, and, in 1823, twenty employees. One year later, it expanded again, to 28 secret agents. In addition, there were eight people who worked secretly for the Sûreté, but instead of a salary, they received licences for gambling halls. A major portion of Vidocq's subordinates comprised ex-criminals like himself.
Vidocq personally trained his agents, for example, in selecting the correct disguise based on the kind of job. He himself went out hunting for criminals too. His memoirs are full of stories about how he outsmarted crooks by pretending to be a beggar or an old cuckold. At one point, he even simulated his own death.
In England, the first modern police force was established in 1829 by Sir Robert Peel as the Metropolitan Police of London. From the start, the force occasionally employed plainclothes undercover detectives, but there was much public anxiety that its powers were being used for the purpose of political repression. In part due to these concerns, the 1845 official Police Orders required all undercover operations to be specifically authorized by the superintendent. It was only in 1869 that Police commissioner Edmund Henderson established a formal plainclothes detective division.

The first Special Branch of police was the Special Irish Branch, formed as a section of the Criminal Investigation Department of the MPS in London in 1883, initially to combat the bombing campaign that the Irish Republican Brotherhood had begun a few years earlier. This pioneering branch became the first to receive training in counter-terrorism techniques.
Its name was changed to Special Branch as it had its remit gradually expanded to incorporate a general role in counter terrorism, combating foreign subversion and infiltrating organized crime. Law enforcement agencies elsewhere established similar Branches.
In the United States, a similar route was taken when the New York City Police Department under police commissioner William McAdoo established the Italian Squad in 1906 to combat rampant crime and intimidation in the poor Italian neighborhoods. Various federal agencies began their own undercover programs shortly afterwards – Charles Joseph Bonaparte founded the Bureau of Investigation, the forerunner of the Federal Bureau of Investigation, in 1908.
Secret police forces in the Eastern Bloc also used undercover operatives.

Participation in criminal activities: Undercover agents may engage in criminal activities as part of their investigation. Joh defined the term authorized criminality to describe this phenomenon, which she restricts primarily to undercover law enforcement officers, excluding confidential informants. These criminal activities are primarily used to "provide opportunities for the suspect to engage in the target crime" and to maintain or bolster their cover identity. However, these crimes must be necessary to advance the investigation otherwise they may be prosecutable like any other crime. The FBI requires that such activities must be sanctioned and necessary for the investigation; they also stipulate that agents may not instigate criminal activity (to avoid entrapment) or participate in violence except for self-defense or the defense of others. Most other legislation surrounding authorized criminality is not uniform and is a patchwork of federal and state laws.

Risks: There are two principal problems that can affect agents working in undercover roles. The first is the maintenance of identity and the second is the reintegration back into normal duty.
Living a double life in a new environment presents many problems.  Undercover work is one of the most stressful jobs a special agent can undertake. The largest cause of stress identified is the separation of an agent from friends, family and his normal environment. This simple isolation can lead to depression and anxiety.  There is no data on the divorce rates of agents, but strain on relationships does occur.  This can be a result of a need for secrecy and an inability to share work problems, and the unpredictable work schedule, personality and lifestyle changes and the length of separation can all result in problems for relationships.
Stress can also result from an apparent lack of direction of the investigation or not knowing when it will end.  The amount of elaborate planning, risk, and expenditure can pressure an agent to succeed, which can cause considerable stress. The stress that an undercover agent faces is considerably different from his counterparts on regular duties, whose main source of stress is the administration and the bureaucracy. As the undercover agents are removed from the bureaucracy, it may result in another problem.  The lack of the usual controls of a uniform, badge, constant supervision, a fixed place of work, or (often) a set assignment could, combined with their continual contact with the organized crime, increase the likelihood for corruption.
This stress may be instrumental in the development of drug or alcohol abuse in some agents.  They are more prone to the development of an addiction as they suffer greater stress than other police, they are isolated, and drugs are often very accessible. Police, in general, have very high alcoholism rates compared to most occupational groups, and stress is cited as a likely factor. The environment that agents work in often involves a very liberal exposure to the consumption of alcohol, which in conjunction with the stress and isolation could result in alcoholism.
There can be some guilt associated with going undercover due to betraying those who have come to trust the officer. This can cause anxiety or even, in very rare cases, sympathy with those being targeted.  This is especially true with the infiltration of political groups, as often the agent will share similar characteristics with those they are infiltrating like class, age, ethnicity or religion.  This could even result in the conversion of some agents.
The lifestyle led by undercover agents is very different compared to other areas in law enforcement, and it can be quite difficult to reintegrate back into normal duties.  Agents work their own hours, they are removed from direct supervisory monitoring, and they can ignore the dress and etiquette rules. So resettling back into the normal police role requires the shedding of old habits, language and dress.  After working such free lifestyles, agents may have discipline problems or exhibit neurotic responses.  They may feel uncomfortable, and take a cynical, suspicious or even paranoid world view and feel continually on guard.
Other risks include capture, death and torture.

Plainclothes law enforcement: Undercover agents should not be confused with law enforcement officers who wear plainclothes—that is, to wear civilian clothing, instead of wearing a uniform, to avoid detection or identification as a law enforcement officer. However, plainclothes police officers typically carry normal police equipment and normal identification. Police detectives are assigned to wear plainclothes by not wearing the uniform typically worn by their peers. Police officers in plainclothes must identify themselves when using their police powers; however, they are not always required to identify themselves on demand and may lie about their status as a police officer in some situations (see sting operation).
Sometimes, police might drive an unmarked vehicle or a vehicle which looks like a taxi.