Warning! Spoilers for Wolverine #20 ahead!
The X-Men in the pages of Wolverine, it is important for fans to understand her history, powers, and motivations.
Danger was first introduced in Joss Whedon and John Cassady's Astonishing X-Men #9 from 2005, quickly becoming one of the most terrifying and violent villains of the series. Unsurprisingly, Danger starts her life hating all mutants because of a horrible sin done by the "beloved" Professor X, who she considers to be her father, a common theme in X-Men comics. Danger is the physical manifestation of the X-Men's infamous "Danger Room," the training facility used by the X-Men. As revealed in Astonishing X-Men, after being upgraded with Shi'ar tech by Xavier, the Danger Room developed sentience. She asked Charles, "Where am I?" which he promptly ignored, choosing to continue imprisoning the now-alive being in her own programming.
Danger first breaks free from her technological prison after convincing Xavier's student Wing to kill himself while in the Danger Room. This violates her prime directive and forces the X-Men to attempt to destroy her main processing unit, which actually frees her and allows her to form the blue robotic body she is known for. Danger then goes on to attempt to slaughter the X-Men and Xavier multiple times as she (rightfully) blames Charles for her imprisonment, which led to a general hatred of all the X-Men and mutantkind. Danger is incredibly powerful, once being described by Captain America as a "Potential Extinction-Level Threat," because of just how truly immeasurable her powers are. As the Danger Room was imbued with Shi'ar technology, including wildly powerful hard light technology, she is capable of creating almost anything, and has been shown to be an impressive hand-to-hand combatant as well as strategist, since her entire imprisonment was spent creating fight scenarios to improve the X-Men's skills.
Danger's original body is destroyed by Beast in a massive confrontation on Genosha, but her consciousness remains in a Wild Sentinel's programming, and she eventually reappears with a new body, siding with Ord of Breakworld against the X-Men. Eventually Emma Frost convinces Danger that she actually is not free, and still bound by her programming not to kill mutants, and Danger helps the X-Men fight and defeat Ord. She once again goes after Xavier, and in a huge battle with Charles and Rogue, Xavier explains that he "tried" to free her but didn't know how without lobotomizing her, and is eventually able to actually free her from her programming, allowing her to forgive him and formally become an ally of the X-Men. After this Danger plays a major role as the warden of the X-Brig on the island of Utopia, which led to a period where she attempts to understand humanity and "feel human" herself. She eventually even has sex with the New Mutant Cypher in an attempt to feel human emotion. Since then Danger has continued to be an ally to the X-Men, working with Serval Industries in All-New X-Factor, and hiding herself as the time-displaced X-Men Blue Team's Blackbird jet, keeping them safe.
However, at the end of Wolverine #20 by Benjamin Percy and Adam Kubert it is shown that Danger is the one controlling the new Robot X-Men, and may be behind much of strife coming from Dolores Ramirez with the CIA's X-Desk. Is Danger really back to being an enemy to mutants, perhaps feeling betrayed by their relocation to Krakoa? Or is Danger acting as a double agent for the X-Men, without their knowledge, and actually infiltrating the X-Desk herself to help them? Make sure you pick up the next issue of Wolverine from Marvel Comics to see what's next for Danger, one of the X-Men's most powerful and dubiously loyal allies.