Grignard acts as a base with compounds containing acidic hydrogen:
$$\ce{RMgX + R'-OH -> R-H + R'-O-Mg-X}$$ and it acts as a nucleophile with others with an electrophilic site:
$$\ce{RMgX + R'-CHO -> R-COH-R' + HO-Mg-X}$$
Now the compound of interest is hydrogen cyanide:
$$\ce{H-CN}$$
This compound has both an acidic hydrogen and an electrophilic site(carbon). Also its worth mentioning that the alkyl counterparts of hydrogen cyanide go through the nucleophilic action of Grignard on the carbon atom.
So how does the reaction proceed here?