A sweeping defense bill locks in millions for cyber operations and forces the Pentagon to confront its risky reliance on unsecured communications.