Skip to content

extract defectdojo quick report

This MR brings multiple changes that relates to the task of producing html reports from defectdojo.

Defectdojo has a quick report feature that does what we need, which is to present contextualized information about security vulnerabilities in a human readable format. The problem is that it needs to be accessed with username and password credentials following a CSRF login flow, which requires either to emulate the logic or to use a headless browser for login automation. The second approach was taken using selenium because there wasn't a clear, immediate way to reimplement the login flow using tools such as curl.

There is then a python script which is run using a specialized cicd toolkit docker image with the proper dependencies built into it.

Other notable changes were the import of rules from the security pipeline implementation in nunet-infra to fix a scanning issue where known vulnerabilities weren't being sent to defectdojo. The job that publishes html reports was also refactored to be a job template which later jobs will use to send reports. The idea was to have a single job that would send all files at once, but that was starting to become complicated because some previous jobs might not be run, or might run conditionally in the same .post stage which made the behavior of the publish report job unpredictable. Having an instantiation of the job on a need basis helps us guarantee we have the file ready with needs configuration at the expense of increasing the number of jobs.

This merge request was used to test the pipeline: device-management-service!337 (merged). Once this MR is finished I can change the referenced branch in DMS to use the develop branch and produce another merge request moving DMS to use test-suite and test if there are other jobs in the pipeline that aren't behaving correctly.

related to #80

Edited by Gabriel Chamon

Merge request reports