Life imitating art is seldom a good thing for filmmakers. Last year, The Watch changed its name and Gangster Squadreshot entire sequences because of parallels to real-life tragedies, and more recently Jim Carrey withdrew his support for Kick-Ass 2, citing parallels to the Sandy Hook shooting. But in this case, real life has bolstered art: the actions and subsequent persecution of PRISM whistleblower Edward Snowden has served only to make Alex Gibney's astute We Steal Secrets even timelier, with its open-ended, troubling questions about the morality of truth-telling for its own sake.

As much two-pronged character study as journalistic document, We Steal Secrets charts the rise and fall of WikiLeaks founder and 'face' Julian Assange, alongside the smaller and sadder story of former US solider Bradley Manning, who is currently on trial for leaking the Iraq and Afghan War Logs to WikiLeaks. Neither is interviewed here; Assange declined to appear because he saw the film as propaganda.

The title itself is not about WikiLeaks and doesn't come from Assange, as we have assumed - it comes, instead, from former CIA and NSA director Michael Hayden, and "we" is the American government. It's these kinds of subtle rug-pulls that make We Steal Secrets such compulsive, disconcerting viewing.

Julian Assange in 'We Steal Secrets: The Story of WikiLeaks'

Similarly, Gibney doesn't begin in the expected place, with, say, a quick-cut montage of headlines and pap shots illustrating Assange's rise and fall. Instead, he opens on a little-known 1989 incident known as "the WANK worm attack" (cue sniggers among British audiences), an anti-nuclear hack which was the first computer worm to have a political message attached. Although he has never confirmed or denied it, the attack is depicted as the early work of Assange.

There's a light, prankster edge here that sets the tone for what's initially to come; a portrayal of Assange that is sympathetic bordering on reverential. Assange is, in many respects, an easy guy to like - ballsy, truth-seeking, a "humanitarian anarchist" - and there are complimentary talking heads aplenty in the early going. "I like crushing bastards," he says cheerfully, in one of several telling chunks of archive footage.

But Gibney is far from seduced by his subject, and the talking heads - including Assange's former right-hand man Daniel Domscheit-Berg - become gradually more disgruntled, sketching out Assange's increasing paranoia, his self-regard, his hubris. The sting in the tail is an interview with one of the women who has accused Assange of sexual assault, and been variously dismissed as a liar, a fantasist and a honey-trap. It's about as nuanced a portrait of Assange as could possibly have been drawn without Assange's involvement, a car-crash study of admirable goals and pitiful actions, but it's inevitably a story without resolution or definitive insight.

More emotionally engaging is the strange, sad saga of Manning, who's drawn as increasingly unstable and isolated in the time leading up to his decision. Driven in part by youthful idealism (his leaks included video evidence of vicious US airstrikes against civilians), and in part by crippling loneliness, Manning is a far easier character to sympathize with wholeheartedly, and it's plain that Gibney does. Excerpts from the online chats Manning shared with hacker Adrian Lamo (who ultimately reported him to the feds) are used here in place of the one-on-one interview Gibney was, of course, unable to obtain. The effect is moving, driving home the reality of a bullied kid who only knew how to express himself through a keyboard.

The range of Gibney's subjects, the rigour of his research and the complexity of his questions make We Steal Secrets breathlessly compelling, but it's the moments of psychological probing that haunt the most.