and it is still in use today even for African-American CIA agents. For example, Dan Freeman a CIA agent trained in guerrila warfare and clandestine operations was the main character in a book which was the basis for the movie "The Spook that sat by the Door".
Webster's New World Dictionary defines spook as an undercover agent or spy.
A google search reveals the use of the term spook for CIA's agents as late as 2006 in various official and non-offical documents.
The online etymology dictionary documents the noun usage begining in 1942.
That same dictionary indicates the root word is Dutch (1801) spooc or German Spuk meaning ghost or apparition. Now this makes since since spys or undercover agents are not suppose to found out while doing their mission. They are suppose to be able to get into enemy territory unseen do their mission and get out undetected like a ghost OR remain undetected for YEARS while sending vital information to their home country while in enemy territory.