A computer-implemented method for determining an origin of a target source code for a computer program or a part thereof, the method involving: searching a plurality of software archives from different sources in a global computer network to find occurrences of the target source code among source code files in said software archives; for every found occurrence of the target source code, collecting key information about the matching source code file (142; 144; 146; 148); from the key information collected for all matching source code files (142; 144; 146; 148), building a frequency map that contains, for each keyword found in the key information, a keyword count value being indicative of the number of times the keyword occurs in the key information; applying a scoring scheme to the matching source code files (142; 144; 146; 148) based on the built frequency map; determining a highest score (Vmax) among the matching source code files (142; 144; 146; 148) after the scoring scheme has been applied; determining the origin of the target source code as the matching source code file having the highest score (Vmax); and generating a control signal to prevent execution of the computer program if the validity of the author or organization behind the origin of the target code is not credible, wherein the key information about each matching source code file (142; 144; 146; 148) is collected as one or more keywords from a plurality of attributes of the matching source code file and/or the software archive in which it was found and wherein the plurality of attributes includes at least two of the following: an author, a repository name, a filename and a resource location of the matching source code file (142; 144; 146; 148) and/or the software archive in which it was found. searching a plurality of software archives from different sources in a global computer network to find occurrences of the target source code among source code files in said software archives; for every found occurrence of the target source code, collecting key information about the matching source code file (142; 144; 146; 148); from the key information collected for all matching source code files (142; 144; 146; 148), building a frequency map that contains, for each keyword found in the key information, a keyword count value being indicative of the number of times the keyword occurs in the key information; applying a scoring scheme to the matching source code files (142; 144; 146; 148) based on the built frequency map; determining a highest score (Vmax) among the matching source code files (142; 144; 146; 148) after the scoring scheme has been applied; determining the origin of the target source code as the matching source code file having the highest score (Vmax); and generating a control signal to prevent execution of the computer program if the validity of the author or organization behind the origin of the target code is not credible, wherein the key information about each matching source code file (142; 144; 146; 148) is collected as one or more keywords from a plurality of attributes of the matching source code file and/or the software archive in which it was found and wherein the plurality of attributes includes at least two of the following: an author, a repository name, a filename and a resource location of the matching source code file (142; 144; 146; 148) and/or the software archive in which it was found.