How red flags, like those of Navy shooter, are missed

They've passed background checks, and have even been given security clearances -- but now, some of those people doing work for the U.S. government have been implicated in espionage, disclosures of national secrets, and mass shootings.

And a review of the government's system of those checks and clearances finds that it's nearly impossible to adequately investigate the nearly 5 million Americans who have those clearances, and make sure they can be trusted with access to military and sensitive civilian buildings.

The Associated Press review was based on interviews, documents and other data. It found the government overwhelmed with the task of investigating the lives of so many prospective employees and federal contractors, and then periodically re-examining them.

The system focuses on identifying applicants who could be blackmailed or persuaded to sell national secrets -- not those who might commit acts of violence.

And it relies on incomplete databases -- and a network of private vetting companies that earn hundreds of millions of dollars to perform checks, but whose investigators are sometimes prosecuted themselves for lying about background interviews that never occurred.

A lawyer who represents people who've been denied clearances, Mark Riley, says, "It's too many people to keep track of with the resources that they have."

In the latest violence, the Navy Yard gunman passed at least two background checks and kept his military security clearance, despite serious red flags about violent incidents and psychological problems.