Dear Student,
Nitric oxide act as an oxidising agent. When it comes in contact with nitric acid it forms oxide layer on the surface of aluminium metal and this oxide layer act as protective layer which protect the inner core of the metal by prevention of contact between aluminium metal and nitric acid.
Regards