Norway and Denmark, besides both benefitting enormously from US financial aid after WW2, are founding members of NATO, and both countries have always played an active role in the alliance. Norway additionally shared a border with the Soviet Union, along with all of its obvious intelligence-related benefits.
If your question is meant to imply some sort of equation between social democracy - that is, mixed-market capitalism with a comprehensive welfare system - with "Red" socialism, then I take issue with the premise of your question. Social democrats are not socialists. In his Kråkerøy speech in 1948, social democrat PM Einar Gerhardsen (affectionally known as the "country's father" in Norway) chastised not only the Norwegian Communist Party (which received 11% of the votes at its historical peak in 1945, thanks in part due to the role of communist partisans during WW2), but communism in general.
In Denmark, the socialdemocratic party was fiercely anti communist. And even went so far as setting up an (private) group of people dedicated to spy on the socialists and communists. The intelligence was as far as I know shared with the CIA.