For testing of halogens, Nitric acid is added to the sodium extract because if CN− or S2− are present then they will be oxidised and removed before the test of halides.
NaCN+HNO3→NaNO3+HCN↑
Na2S+HNO3→NaNO3+H2S↑
Nilnic acid decomposed \mathrm{NaCN}&{\mathrm{Na}}_{2}S, else they precipitate in test & misquite the resolve