DEV Community

Cover image for Hide & Seek code
Visakh Vijayan
Visakh Vijayan

Posted on • Edited on

Hide & Seek code

We were trying to hide our code from the client. We didn't want them to judge us because of the bad indentations we followed. Lol!

Basically, we wanted to obfuscate it so that the client doesn't get hold of the source code. This is what we did.

The proud plan

  1. We had a git repository obviously where all the developers pushed their code.
  2. Each client had their own branch. This was done to handle customizations at a client level.
  3. Each client had their own server instance(AWS) also. They had a docker file that would pull code from the particular branch into the server.
  4. On the server, once the code was pulled, it was built and obfuscated and the original source files were removed. Only the gibberish build folder remained on the client's server.

The not-so-proud moment!!!

So far things were good. That is when we realized the client can modify our docker file and pull the code from the branch if needed.

  1. We introduced a new server in between our git repository and the client's server. The only function of this server was to take as input the client name and send as output the build file after obfuscation to the client's server.

But since we are never satisfied with things in our lives, we are still trying to find flaws in this approach. We know one for sure .i.e. it takes too much time to do all of this.

P.S.: if you are one of our clients, we did this to protect your code from malicious attacks :|

Happy programming.

We took it a step further here

Top comments (0)