Among the countless unanswered questions surrounding yesterday’s Navy Yard rampage, one gets repeated over and over: How did 34-year-old alleged shooter Aaron Alexis, a man with a history of arrests and gun infractions, get the security clearance needed to enter a military facility?

The exact answer to that question is still emerging as investigators piece together Alexis’s history. But simply put, security clearances are not quite so secure — nor quite as elusive — as some outside the Beltway might assume.

More than 4.9 million federal government workers and contractors held security clearances in 2012. That number includes not only employees of government agencies like the Department of Defense and the Department of State, but also thousands of people who work for contractors on everything from IT to packing crates.

Individuals who have security clearances don’t necessarily have “perfect” records, as the massive defense contractor Northrop Grumman wrote in a brochure for new employees in September 2010. All go through an investigation process, during which the Office of Personnel Management or another government agency looks into the applicant’s police and credit records. Applicants must also submit a detailed account of their employment, financial and personal histories, including any debts or foreign contacts they may have.

Even then, however, investigators are evaluating whether an individual is trustworthy — a subjective standard that leaves plenty of room for interpretation. OPM says that negative information, including arrests, can be mitigated by “recency, seriousness [and] relevance to the position and duties.” Investigators have, on appeal, granted clearances to people with histories of alcoholism, drug use, criminal conduct and significant, delinquent debts. Northrop Grumman gives these guidelines about Department of Defense clearances to its employees:

What can disqualify you?

— You are not a U.S. citizen

— You were dishonorably discharged from the military

— You are currently involved in illegal drug use

— You have been judged as mentally incompetent or mentally incapacitated by a mental health professional

— You have had a clearance revoked for security reasons

— You are considered a dual citizen AND you are currently holding a passport from a country other than the U.S.

What may not disqualify you but may delay the receipt of a DoD clearance?

— You have significant foreign national contacts (immediate family members living in other countries)

— You own property in another country

— You have been convicted of a felony within the past 10 years

— You have a significant history of financial problems with heavy indebtedness and late payments (over 180 days), bad debts, fairly current tax liens, repossessions and garnishments

Northrop Grumman

Alexis, of course, was both a U.S. citizen and a former Navy reservist who received an honorable discharge from the military. He was also never charged for incidents in 2004 and 2010 in which he shot out a car’s tires and fired a shot through the ceiling of his apartment into an upstairs neighbor’s dwelling.

This is the second event this year that will likely prompt deeper looks into the security clearance system. In July, lawmakers also demanded to know how Edward Snowden, the NSA contractor who leaked classified files to The Washington Post and several other newspapers, obtained his top-secret clearance.