The source code of all WSO2 products as well as the scripts that are used for building WSO2 products are maintained in GitHub repositories. If you are a developer, you can easily clone the source code from these Git repositories, and if required, you can do modifications and build a customized product on your own.
For more information, seeĀ Using Maven to Build WSO2 Products.