Senior officer: No-deal Brexit would harm UK security