Title
#core
k

koba

12/24/2020, 12:00 PM
Hi Guys, what's the best way to understand the
osquery
codebase? Are there any resources other than official documentation that can help? I am not a very experienced developer and am aware of the challenges that such a large codebase can present but i'm also very inclined to explore. Any recommendations are welcome !
theopolis

theopolis

12/24/2020, 3:00 PM
Hey @koba, at a high level I recommend Microsoft's VScode as a GUI IDE. There are lots of features to search and navigate the code. If you open a checkout of osquery in VSCode you should be prompted to install CMake and C++ syntax highlighting and CMakeTools to try to give you additional syntax help (this doesn't always work). I also recommend trying to build with the default options, then make small code changes and see how they effect the build. One example is to add some
printf
trace statements. The CI configuration is rather dense but it's a good way to peek at how we run several tests: https://github.com/osquery/osquery/blob/master/azure-pipelines.yml
3:01 PM
Do you have a specific goal in mind for exploring the code? Perhaps I can give you more specific guidance?
s

seph

12/26/2020, 6:28 PM
For me, I find the best way to get into a code base is to want to do something. This acts as motivation to start exploring an area of the code, and adding the functionality I want. For me, for osquery, this has tended to be tables and sql functions.
k

koba

12/30/2020, 1:24 PM
Hi @theopolis , thanks for answering with such humility. I use VSCode already and yes that helps. I also tried to look at CI config along with the CMake file and it makes some sense already. I am already trying what @seph recommends. Reading the docs on how to create a new table helped. All of this is helping, but...may it's just me, I think a little more meta documentation will help?! For ex, some of the key design decisions that you think may not be very obvious?
1:26 PM
yeah mainly design principles...to get a better overall understanding before digging deep
theopolis

theopolis

12/30/2020, 5:06 PM
Sure but if you don’t mind me asking, do you have a specific goal you are working towards?