A technology security expert has warned the government that its understanding of its own data systems is not up to scratch.