Patent ID: 8621237

Claim:
In an electronic device, a method of protecting source code, the method comprising: performing, on the source code, a scanning operation which provides a scanning result indicating whether the source code includes a cryptographic key; when the scanning result indicates that the source code includes a cryptographic key, performing a remedial operation to prevent undesired exposure of the cryptographic key; and when the scanning result indicates that the source code does not include a cryptographic key, refraining from performing the remedial operation; wherein the source code belongs to a particular software component of a set of software components; and wherein the method further comprises after performing the scanning operation, building a software application from the set of software components; and wherein performing the remedial operation to prevent undesired exposure of the cryptographic key includes: identifying a location within the source code to insert a function call to a routine which obtains a substitute key from a substitute key source; inserting, at the identified location within the source code, the function call to the routine which obtains the substitute key from the substitute key source; and removing the cryptographic key from the source code.