decomposed to $\mathrm{H}_{2} \mathrm{S}$ and $\mathrm{HCN}$ by $HNO_{3}$
$\mathrm{NaCN}+\mathrm{HNO}_{3} \rightarrow \mathrm{NaNO}_{3}+\mathrm{HCN}$
$\mathrm{Na}_{2} \mathrm{S}+2 \mathrm{HNO}_{3} \rightarrow 2 \mathrm{NaNO}_{3}+\mathrm{H}_{2} \mathrm{S}$
These will escape from the solution and will not interfere with the test for halogens.