The risk of contractors is real, Justice Dept. national security head says

'The threat of insiders is real:' Carlin

After the arrest of a National Security Agency contractor for allegedly stealing government secrets, the Justice Department's John Carlin told CNBC on Wednesday that the risk posed by contractors is "real."

"I do think it is an important practice point for those of us in government but also in the private sector, that if you are trying to protect yourself, you have to look more broadly than your own company to what those that you hire may have access to," said Carlin, who is assistant attorney general for national security.

The unnamed NSA contractor has been accused of stealing highly classified computer codes that were developed to hack into the networks of foreign governments. The story was first reported byThe New York Times.

The arrest, which occurred Aug. 29, was made public Wednesday.

"According to the complaint, what he's been charged with is taking the information and bringing it home," Carlin said in an interview with CNBC's "Power Lunch" from the Cambridge Cyber Summit at MIT in Cambridge, Massachusetts. The conference is sponsored by CNBC, MIT and The Aspen Institute.

"I think in the days and weeks to come you'll see continued investigation and then through the court process, maybe additional details."

Carlin wouldn't address the specific charges outside of the formal complaint, but said the code was taken home intentionally.

"When you're a government employee, you swear an oath to protect information knowing the damage that the disclosure of sensitive sources and methods can do to our ability to protect ourselves against all sorts of foreign threats," he said.

The contractor worked for Booz Allen Hamilton — the same consulting firm Edward J. Snowden worked for in 2013 when he took documents about NSA surveillance programs.

"I'm sure the trusted professionals I work with across the community will take a hard look at anything they can learn from this case, whether about contractors or other issues, to see whether they can better defend our systems from others who might try to steal from them."