After the Readme and the build jobs, next, perhaps we should look at a system’s entry points. The build jobs or the Readme probably gave hints as to what the entry points were.
Docker ENTRYPOINT
Did you discover a Docker build in the previous explorations? Look at the ENTRYPOINT that was defined in the Dockerfile, if there is one. Not all Dockerfiles will define an ENTRYPOINT. It may be the job of the deployment and run pipelines to set a --entrypoint
flag, or perhaps the default ENTRYPOINT from a parent Docker image is sufficient.
The Docker ENTRYPOINT is usually a shell script that starts up the system. In a Java environment, this typically looks like calling java
and passing an “uber” JAR to load. This is useful to note, because then you can dig into either the build process or the JAR itself to pull out what the main class is. Also, the ENTRYPOINT script may contain other nuggets of information; perhaps how migrations run, or different “modes” the system can run in.
Main Class
The main class, at least in a Java program, is an obvious entry point to consider. Ironically, in many modern web frameworks, the main class is not very useful. They tend to hide all the juicy bits in other configuration files. Sometimes specific conventions for how code should be organized must be followed, further obscuring this entry point unless you are already familiar with those conventions. In those cases, it may be enough to learn what the web framework is, and that can guide further research. More juicy main classes may point you towards other resources. They may show you how resources are registered, or the filters that tell you how security checks are handled.
At the very least, investigating the main class will likely give you hints as to how the code is structured. Is there a grouping of maven projects involved? What package does the main class live in? What dependency injection shenanigans are being invoked?
Scripts
It is very possible that you come across some collection of scripts that dictate how the application actually runs. These, just like a Docker Entrypoint script, can give you hints to the different “modes” an application can run in. They may even lay out what dependencies are necessary for it to function.
To be sure, the entry points quite often do not give a huge amount of information, but they do serve as useful footholds to use for more focused research. They give you a foundation. Of course, you can come back to them to review how the service actually comes to life.