No the main skill is meant. To take up that example the security officer would need to have a general idea of security to gain the rank of Lt., etc.
However if I remember correctly the departmental skills one gets with the template are sufficient to get as high as Full Lieutenant.
Additionally not all Security Officers have "Security" as their primary departmental skill. A character wo is responsible for Computer Security could have "Computer" as primary departmental skill instead...
We came in peace, for all mankind - Apollo 11