SinghHrmn's Blog

GSoC Week 6: Begin the Phase 2

SinghHrmn
Published: 07/09/2020

What I did this week?

As mentioned I worked on refactoring output_engine due to its increasing size. It will now be easy to maintain although I have not sumbitted a PR because I need the latest PR by Niraj to work and I'm waiting to get that merged. As soon as that gets merged I'll file a 2 PRs one refactoring output_engine and other adding the exact path to the extracted files. That issue was also on our priority list. But I have not added that in our HTML and we are just storing that for now and it will be covered in the future updates.

What is coming up next?

For now I'll be researching on my future goals and I'll work to update the HTML reports according to the Triage stuff and according to the new Paths that the user might want to see in their HTML reports. New HTML design will contain changes acccording to the new Triage stuff that Niraj kamdar has added  Like New Found, Mitigated, Ignored etc. 

Have I got stuck anywhere?

I'm stuck because I need the latest PR by Niraj to get merged in order to work Although I have started and completed my work on top of the Niraj's Latest PR but That PR might need some changes and I'll need to incorporate those changes in my PR too. 

View Blog Post

GSoC Week 5: Priority Matters

SinghHrmn
Published: 06/29/2020

What I did this week?

Instead of working on HTML output tests I worked on normalizing the package name and the module name because they were creating confusion so I prioritized that. I also added Vendor field in Console, CSV and JSON. So now we'll get output as Vendor, Product, Version, CVE Number, Severity. That will help distinguish between products that have same name but different vendors. Also I found that our console output is failing on windows, thanks to Niraj-Kamdar who was working on improving windows tests. So I also fixed that issue but as the issue was related to rich so I contacted the developer of rich because this issue can be faced by others. So he worked and released rich version 3.0.0 which he thinks can solve our error. Though I have not tested that But I think that will solve our problem in a very efficient way. Thanks to the developer of rich.

What is coming up next?

As things are changing fast I hope to work on the last week leftovers. But I guess I'll need to work on improving the filepath description in the logs to be more precise and hierarchical manner. And we also need to store that to produce the list of affected files somehow and show that in HTML Reports if necessary.

Have I got stuck anywhere?

There were some priority changes so I had to change my plans. But there were no problems encountered this week so far.

View Blog Post

GSoC Week 4: import rich:

SinghHrmn
Published: 06/22/2020

What I did this week?

I worked on adding color to the console as well as log. I'm using rich library for that. The reason why I choose this library is that rich supports cross platform implementaion and it's ability to detect terminal and adjust acoordingly is awesome. It supports mainly every terminal and even remove color codes if it detects that the output is not console. Now we can generate colored output for the console.

What is coming up next?

As the size of OutputEngine is growing and we have many different implementations inside a single file. I'll work to refactor the code so that it is more maintainable. Also I will work to add tests for the HTML output. Currently I'm learning different ways in which I can test the HTML output. 

Have I got stuck anywhere?

This week I was lucky and haven't met with any unneccessary blockages.

View Blog Post

GSoC Week 3: try except finally:

SinghHrmn
Published: 06/15/2020

What I did this week?

Last week I discussed that we need to find another charting library because "Pygal" was not up to the mark. So I started looking and found that Plotly can be an option. So I tested if it can produce the same results as Pygal and found it is much more useful. I'm now using Plotly Python which is a Plotly API. So, now we can quickly generate graphs using Plotly. I was also working on adding Filter property so that the user can filter out products. Now we can generate HTML reports with a nice filter property.

What is coming up next?

This week I will work on adding colors to the console output. After this change we will get a nice console output with different color for different severity levels. 

Have I got stuck anywhere?

There were few issues with Plotly Implementations and I guess they are solved in Plotly but it will take some time for changes to get reflected in Plotly Python. Although I have solved those problems but Plotly's own implementaion will be faster so it would be nice if they get that fixed.

 

View Blog Post

GSoC Week 2: except Exception as opportunity_to_learn:

SinghHrmn
Published: 06/08/2020

What I did this week?

I was working on the HTML Report genration process. For that I have to do some changes in the cvedb.py and some modificatioins in the structure of the code. We also figured out the confusion in the "product" and "package" naming conventions. So now we are using product everywhere except for the packages that are downloaded from the internet. Also I looked for other libraries for chart generation beacuse the one that we were using currently ("Pygal") is not being maintained. I'm currently testing Plotly and see if that can solve our problem.  

What is coming up next?

After I have worked on HTML Report generation I'll work on Adding Color to the console output. And other smaller changes in the HTML Report Like adding a filter property. 

Have I got stuck anywhere?

I was using pygal to generate SVG Charts but then Jhon said pygal is not being maintained and we must use something that is maintained and tested. But this helped me realize the importance of a maintained project. So I excepted this exception as opportunity to learn.

View Blog Post