Source code virus
Source code viruses are a subset of computer viruses that make modifications to source code located on an infected machine. A source file can be overwritten such that it includes a call to some malicious code. By targeting a generic programming language, such as C, source code viruses can be very portable. Source code viruses are rare, partly due to the difficulty of parsing source code programmatically, but have been reported to exist. One such virus (W32/Induc-A) was identified by anti-virus specialist Sophos as capable of injecting itself into the source code of any Delphi program it finds on an infected computer, and then compiles itself into a finished executable. Notes

References 

 

Computer viruses
Virus
Source code