As I understand, code obfuscation is used to make reverse engineering difficult/hard for the adversaries/red-team team.
Now Ifif I use a source code obfuscator where-in say a .C/.CPP file is used as input and an obfuscated .C/.CPP file is generated. Should, should the source code repository such as GIT/SVN store the plain-text text.C/.CPP file or obfuscated .C/.CPP file?
Next, Ifif a plain-text text .C/.CPP file is stored in the repository, any attacker gaining access to the repository system would immediately gain access to IP-protected code or if the code was published in public github by mistake(https://www.securityweek.com/toyota-discloses-data-breach-impacting-source-code-customer-email-addresses)by mistake. Isn't itIs that right?
In the other case, where the obfuscated .C/.CPP files are stored in the version repository system, Thethe development team would face issues such as readability and unmanageable code. Isn't itIs that correct?
So, what is the best means to protect & store the source code?