During the 1900s and 1910s, Mussolini worked for his local Socialist Party, was jailed for participating in a socialist protest against war in Libya, and edited the socialist newspaper Avanti!
By 1922, of course, he had founded fascism.
It seems to me that this open and enthusiastic support for socialism, even if it ended, would be a major skeleton in the closet for anyone trying to become a right-wing politician. Yet Mussolini wasn't just that, he was the creator of one of the furthest-right ideologies ever.
Did Mussolini's critics (or allies) ever use this reversal in ideology against him? Did anyone suspect him of being a socialist plant? How did Mussolini defend it? How did he come to be not just right-wing, but perhaps the most right-wing leader in the world at the time, with this background? If it didn't cause problems for his political career at all, why was that?
To some extent, Mussolini had the opposite problem: he didn't want to appear just as a man of the "national right" - or worse, as a shill of great capital (the socialist press had made more than a few hints at him being sold to the Ansaldo steelworks and shipbuilding, to the point that Mussolini himself joked about that a few times on his Popolo d'Italia) and therefore, during his transition period from what appeared in substance as an expression of socialist interventionism, national syndicalism, popular radicalism, to a movement of clear and explicit right wing collocation, did his best to promote the view that he was "against the official socialist party", the "Italian Bolsheviks" as he called them, and "not against the proletariat".
Hence his first openings to a vague, but somewhat popular-radical program for his Fasci di Combattimento largely influenced by Alceste de Ambris - at a time when they were an almost irrelevant political force, barely noticeable outside of their support for the Fiume occupation of D'Annunzio and for the famous episode of the sack of the Avanti! building of April 15^th 1919, conducted largely by Arditi and futurist squads, but immediately tied, in the public perception at least, to Mussolini.
Hence the position taken by his Popolo d'Italia, which accepted or even supported certain "economical" strikes during 1919 (and early 1920) but rejected "political" strikes "imposed by the Official Socialist Party".
The tendency of Mussolini to build an antinomy between the national, productive forces, including laborers and the "people of the card", the Official Socialist Party, was driven by many different factors (his personal "moving past socialism" and belief that the Russian revolution had proved the failure of socialism, his increased productivism and tendency to frame the social conflict as one between productive and parasitic groups, rather than between classes, his personal resentment for the attitude of the socialist leadership at the time of his expulsion) - among those, there was certainly that of securing a distinct collocation outside of the many small fractions of the national and radical right (that is, Mussolini's aim was to postion himself as anti-Bolshevik but not pro-capital) whose internal divisions made them substantially irrelevant and at constant risk of falling under the hegemony of the Nationalis Association.
Despite his efforts, Mussolini did not succeed as a "third way" politician. His attempts to work for the composition of a front of the "democratic" or "left" interventionism (as it was known at the time) ended in failure when his candidature was rejected with the argument that the mere inclusion of Mussolini's name in their list (for the November 1919 elections) would have turned away any of those who looked for an alternative to the Official Socialist Party. In part against his own best wishes, Mussolini was for many a symbol of "anti-socialism"; and while the national and conservative press did at times criticize his position, it had less to do with his suspect past than with certain contemporary trends.
The result was a complete electoral collapse of the already weak and vaguely defined movement of the Fasci. The newborn movement had ended up running with a composite “Democratic Block”, but under the sign of the fascio dei littori in the extremely stacked college of Milan. Despite their choice to lead with two of their most representative men: Benito Mussolini and founder of futurism, Filippo Tommaso Marinetti (and other notable “personalities”, such as Agostino Lanzillo, Guido Podrecca and Arturo Toscanini), their list, filled with nineteen names had gained a measly 4,657 votes (Mussolini, in fairness had added 2,420 preferences and 1,987 additionals, bringing his “individual number” up to 9,064) over a total of 315,904. Despite Mussolini's remarks that “the Great War had ended Turati and Treves”, the two socialist leaders had led the national rankings in so far as votes and preferences: the votes for the “Official Socialist” list had been 170,201 – with Turati rounding up at 198,314 and Treves at 196,001. The Socialists had managed to secure the election of 11 out of their 20 candidates, including Costantino Lazzari, Ludovico D'Aragona and Francesco Buffoni.
It was only with the end of 1920, thanks to the ideological and material influence of the agrarian groups, that Fascism was more ro less brought back to life with a clear "national", "order", "right-wing" imprint - which was really too clear to miss or to mistake for anything else.
Already at the end of the conflict though, there was no reason to suspect Mussolini of being "a plant" (incidentally, he wasn't the only one who had switched to interventionism and then to "national" positions during the war). The closest thing we have to an official suspicion on the grounds of Mussolini's socialism was the "special surveillance" he was subject to after his enlistment in WW1; which was nonetheless common to most interventionist and to all "politically active" enlisted men, especially at a time when propaganda among the troops was forbidden even when in favor of the intervention. It is understandable that, with all the talks of "revolutionary interventionism", the authorities could look with some concern at the meaning of such "revolution". But already at the time of his discharge, there was no question of Mussolini's interventionism and of his complete detachment from the official socialists and their neutralist position (that is, it was very, very clear that Mussolini was not doing anti war propaganda) - after the war, the famous report composed in June 1919 by police inspector G. Gasti, after observing again how Mussolini had been "a sincere and passionate apostole" of the intervention and how it wasn't possible to determine exactly how much of Mussolini's "socialist convictions" had been lost along the way, due to the "necessary financial transactions", "contacts and exchanges [of money] with men of different faith", "attrition and acrimony" with "the men of official socialism", stated that
[Mussolini] would never reveal such changes too openly [...] He would always like to appear, and perhaps believe to be, a socialist, despite his efforts being useful for constitutional purposes, despite his rift with those who claim to be the dogmatists of socialist orthodoxy growing deeper and more insanable.
Gasti believed, and the subsequent evolution confirmed his judgment, that Mussolini could operate in a "constitutional" fashion - that is in support of the government forces - which is to say against the socialist (or, as it was still not infrequent to see in official reports, the "subversive" ones). That also goes to explain the more and more frequent relations and inquires, not only with men of the radical and nationalist right which funded his newspaper for the purpose of a pro-war and expansionist campaign (to which Mussolini didn't want to become entirely dependent), but with the actual "legitimate" powers of the state, which led to his pact with Giolitti in preparation of the 1921 elections.