Spy

"Don't act so surprised, Your Highness. You weren't on any mercy mission this time. Several transmissions were beamed to this ship by rebel spies. I want to know what happened to the plans they sent you."

- Darth Vader to Leia Organa

A spy, or secret agent, was an individual who engaged in clandestine observation or acquisition of sensitive intelligence regarding a person or organization or other target of interest, usually for political, military or financial benefit.

Galactic Republic
During the Battle of Christophsis, an investigation led by Clone Captain Rex and Clone Commander Cody revealed that troop movements had been relayed to Separatist forces, allowing the enemy to preemptively attack Republic strike teams. The traitor was identified as the clone trooper sergeant nicknamed "Slick," and was apprehended, though not before he was able to significantly damage the base's weapons depot.

Following the loss of R2-D2 during the Battle of Bothawui, R3-S6 was assigned to Jedi General Anakin Skywalker as a replacement. Unbeknownst to Skywalker and his padawan, Ahsoka Tano, R3-S6 was acting as a covert confederate agent, attempting to facilitate the sale of R2-D2 to General Grievous.

Suspecting Senator Rush Clovis was aiding the Confederacy of Independent Systems, the Jedi Council recruited Senator Padmé Amidala to spy on him. She was extracted by Skywalker following an attempted poisoning by Lott Dod, leaving Clovis behind.

Obi-Wan Kenobi undertook a secret operation disguised as Rako Hardeen, in an attempt to gain the trust of bounty hunters Cad Bane and Moralo Eval. Despite interference from Anakin Skywalker and Padawan Tano, Obi-Wan's mission was an eventual success, revealing a plot by Count Dooku to capture Supreme Chancellor Sheev Palpatine.

Rush Clovis, now a defector from the Separatists, requested the help of Padmé Amidala to uncover the bankruptcy of the InterGalactic Banking Clan via the infiltration of the vault, a facility ordinarily off limits to outsiders.

The Jedi Council granted Anakin Skywalker a seat on the Council, as per the direction of Supreme Chancellor Palpatine, because they wanted Skywalker to spy on the Chancellor and his activities, something that Skywalker felt was both treason and a violation of the Jedi Code.

Galactic Empire
Ezra Bridger infiltrated the Academy for Young Imperials on the planet Lothal, disguised as an Imperial cadet, with the intention of acquiring an Imperial decoder containing the location of an exceptionally large kyber crystal. With the help of Zare Leonis, Bridger was successful and escaped with another cadet, Jai Kell. Leonis opted to remain behind in order to learn more about the disappearance of his sister Dhara. With the aid of his girlfriend, Merei Spanjaf and the rebel cell known as the spectres, Leonis's efforts eventually came to fruition with the rescue of his sister, who had been absorbed into Project Harvester.

Spies for the Rebel Alliance sent secret Death Star plans to Leia Organa on the Tantive IV following the Battle of Scarif.

Following the destruction of Alderaan, the Empire made use of a human female by the name of Tula, who, under duress, manipulated her sister, Tace into unwittingly revealing the whereabouts of Alderaanian survivors.

On Nar Shaddaa, Grakkus the Hutt was apprehended, along with his captive, Luke Skywalker, owing to the efforts Sergeant Kreel, also known as Imperial agent 5241, planted in the Hutt's Palace after Grakkus's collection of Jedi artifacts attracted the attention of the Empire.

When the second Death Star was being constructed, the Alliance's Bothan spies discovered that the super weapon was being protected by a shield generator on a nearby forest moon called Endor. That valuable information came at the cost of many Bothan lives.

First Order
Thirty years after the Battle of Endor, the First Order used mercenary Bazine Netal as one of their spies. When she was posing a girlfriend to Grummgar at Maz Kanata's castle on Takodana, Netal informed the Order that BB-8 was there.

Appearances
{{Scroll box| {{Incomplete list}}
 * Star Wars: Episode I The Phantom Menace
 * Star Wars: Episode II Attack of the Clones
 * {{TCW|The Hidden Enemy}}
 * {{TCW|Ambush}} {{Mo}}
 * {{TCW|Rookies}}
 * {{TCW|Downfall of a Droid}}
 * {{TCW|Duel of the Droids}}
 * {{TCW|Liberty on Ryloth}} {{Mo}}
 * {{TCW|Children of the Force}} {{Mo}}
 * {{TCW|Senate Spy}}
 * {{TCW|Pursuit of Peace}} {{Mo}}
 * {{TCW|Friends and Enemies}}
 * {{TCW|The Box}}
 * {{TCW|Deception}}
 * {{TCW|An Old Friend}}
 * {{TCW|The Rise of Clovis}}
 * {{TCW|Crisis at the Heart}}
 * Darth Maul—Son of Dathomir, Part Two {{{Mo}}
 * Star Wars: Episode III Revenge of the Sith
 * Adventures in Wild Space: The Rescue
 * Rebel Rising
 * Thrawn
 * {{Rebels|Breaking Ranks}}
 * {{Rebels|Rebel Resolve}}
 * Leia, Princess of Alderaan
 * {{Rebels|Imperial Super Commandos}} {{Mo}}
 * {{Rebels|Warhead (episode)|Warhead}}
 * {{Rebels|Through Imperial Eyes}}
 * {{Rebels|Double Agent Droid}}
 * Star Wars: Rogue One&mdash;Cassian & K-2SO Special
 * Rogue One: A Star Wars Story novelization
 * Star Wars: Rogue One: A Junior Novel
 * Rogue One, Part IV {{Mo}}
 * Star Wars: Episode IV A New Hope {{1st}}
 * A New Hope: The Princess, the Scoundrel, and the Farm Boy {{Mo}}
 * Star Wars: A New Hope
 * "Added Muscle"&mdash;From a Certain Point of View {{Mo}}
 * "The Secrets of Long Snoot"&mdash;From a Certain Point of View
 * Han and the Rebel Rescue
 * Princess Leia, Part II {{Mo}}
 * Princess Leia, Part III
 * Princess Leia, Part IV
 * Princess Leia, Part V
 * Battlefront II: Inferno Squad
 * Darth Vader 2: Vader, Part II {{C|Claim only}}
 * Darth Vader 3: Vader, Part III {{C|Mentioned only; in the opening crawl}}
 * Darth Vader 7: Shadows and Secrets, Part I
 * Star Wars 11: Showdown on the Smuggler's Moon, Part IV
 * Star Wars 12: Showdown on the Smuggler's Moon, Part V
 * Star Wars Annual 1
 * Star Wars 19: Rebel Jail, Part IV {{Mo}}
 * Darth Vader 16: The Shu-Torun War, Part I
 * Star Wars 36: Revenge of the Astromech {{Mo}}
 * Han Solo, Part I {{Mo}}
 * Han Solo, Part II
 * Han Solo, Part III
 * Han Solo, Part IV
 * Han Solo, Part V
 * Battlefront: Twilight Company {{Mo}}
 * Star Wars: Episode V The Empire Strikes Back
 * Star Wars: Episode VI Return of the Jedi
 * {{InsiderCite|issue1=149|issue2=150|Blade Squadron (short story)|Blade Squadron}} {{Mo}}
 * Aftermath
 * Aftermath: Empire's End {{Mo}}
 * Phasma
 * Join the Resistance: Escape from Vodran
 * Poe Dameron 8: The Gathering Storm, Part I {{Mo}}
 * Poe Dameron 9: The Gathering Storm, Part II {{Mo}}
 * Poe Dameron 14: Legend Lost, Part I {{Mo}}
 * Poe Dameron 17: War Stories, Part I {{Mo}}
 * Star Wars: Episode VII The Force Awakens
 * Star Wars: The Force Awakens novelization
 * Star Wars: The Force Awakens: A Junior Novel
 * Star Wars: The Force Awakens Graphic Novel Adaptation
 * "Whills"&mdash;From a Certain Point of View {{Mo}}}}

Non-canon appearances

 * Jakku Spy