Trump’s national security adviser shared secrets without permission, files show