Kozak fought as part of a separate company of the Forces of Special Purpose (ChON) against the nationalist armed bands of Garas and Ditrovsky in Ovruch between May and August 1922.
With a group of academy students, Kozak was sent to take part in the Soviet invasion of Poland during September and October 1939, advancing into western Ukraine.
From January 1942 he served a senior inspector of the 1st department of the Directorate for Inspection and Training of New Formations of Rifle Units, part of Glavupraform.
In late September units of the 73rd Guards were among the first to cross the Dnieper in the area of Stary Orlik, capturing and expanding a bridgehead.
For the crossing of the Dnieper twenty soldiers of the division were made Heroes of the Soviet Union, and Kozak himself was awarded the title on 26 October.
[2] During the Budapest offensive in early November, the division crossed the Danube near Batina, captured an important bridgehead and expanded it in sustained fighting.
For this action Kozak was awarded a second Gold Star Medal on 28 April 1945, receiving the rare distinction of being a twice Hero of the Soviet Union.
[2] After the end of the war, Lieutenant General Kozak continued to command the corps in the Central Group of Forces.