Many writers write loose about 'national security', and I think it would help very much if we kept our minds more clear when discussing such topics.
There are three things to consider usually:
(1) being blockaded by sea or in the air
(2) being bombed
(3) being invaded/occupied
If the scare story isn't about any of these three, it shouldn't be considered relevant to national security.
Alliances can be purposeful for national security, and the criteria have to be applied to the treaty allies (within the treaties' definitions) for 'collective security'.
Very, very much hyperventilation, hyperbole, scaremongering, warmongering, wasteful spending and actual wars could be cut down or avoided if only we focused on these three criteria.
A miscreant government on a distant continent is almost never a national or collective security concern - but it might still be the target of extreme hyperventilation, hyperbole, hypocrisy, scaremongering, warmongering, wasteful spending and even be invaded for nothing, with thousands of dead (orders of magnitude more total loss of life) and trillions € wasted expenses.
"National security" debates and articles and the subcultures obsessing about navies, air power, armies depend on fuzzy definitions, unfounded assumptions and an absence of any cost-benefit analysis as do humans depend on oxygen. The emperors are truly without clothes once you cut through the nonsense and ask how a certain described (proposed) effort does avert or end any of the three points.
The last three German surface warship programs, for example: A corvette that's useless in warfare and excessively armed for coast guard-like jobs. A "frigate" with the same flaws, meant to do the same jobs farther away from port, and for longer. And now a program for yet another such useless ship "built for, but not with" useful capabilities in wartime (such as anti-submarine equipment or true area air defence capability). Tragically, these ships were designed to inflict harm #1 on another country (naval blockade), albeit supposedly with a UN mandate only. Such spending is not defence spending, not national security spending, not collective security spending - it's spending for bullying and extremely wasteful spending for maritime policing.