Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved JSON Report with Diff Exclusion and Parameter Logging #378

Closed
wants to merge 3 commits into from

Conversation

matteogreek
Copy link
Collaborator

Changes in this pull request:

  1. Added a new feature to exclude the diff information from the JSON report. Users can now choose to remove the diff field from the JSON reports in two ways:
    • Using the CLI option --no-diff when running the CLI version of Prospector. Example of execution with the --no-diff option:
      ./run_prospector.sh CVE-2020-1925 --repository https://github.com/apache/olingo-odata4 --no-diff
    • Setting the no_diff parameter to True in the config.yaml file. By default the value is set to False.
      ...
      report:
       format: json
       name: prospector-report
       no_diff: False
      ...

This improvement aims to generate lighter JSON reports. Previously, for each commit, the entire diff was saved in the report, resulting in long and heavy files. By providing the option to exclude the diff, we make the reports more concise and easier to manage.

  1. The JSON report now includes a new field called parameters. This field contains the exact values passed to the prospector function during execution. With this addition, users can now easily track and understand the specific parameters used to generate the results by opening the report file. An example of the JSON report with the parameters tracking is the following:
"parameters": {
       "vulnerability_id": "CVE-2020-1925",
       "repository_url": "https://github.com/apache/olingo-odata4",
       "publication_date": "",
       "vuln_descr": null,
       "version_interval": "None:None",
       "modified_files": [],
       "advisory_keywords": [],
       "use_nvd": true,
       "backend_address": "http://backend:8000",
       "use_backend": "always",
       "git_cache": "/tmp/gitcache",
       "limit_candidates": 2000
   },

@copernico
Copy link
Contributor

@lauraschauer could you please check if any code from this PR needs to be salvaged?

@lauraschauer
Copy link
Contributor

@copernico This was merged in PR #403 :)

@copernico
Copy link
Contributor

Merged with #403, closing.

@copernico copernico closed this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants