Initiating a Comparison

To compare two scan reports, use the compare command followed by the paths of the two reports you want to compare:

fourclover compare -new  -old 

Specifying Output File (Optional):

If you want to save the comparison report to a file:

fourclover compare -new report_1.json -old report_2.json -out 

Understanding the Comparison Report

After executing the comparison command, Four Clover generates a comparison report that highlights the differences between the two scan reports.

Components of the Comparison Report

The comparison report provides valuable insights into the changes between the two reports. It typically includes the following components:

  • Date: Date and time when the comparison was performed.

  • Scanned Directories: Paths of the directories scanned in the old and new reports.

  • Total Number of Changes: Total count of changes detected.

  • Number of Files Added/Altered/Deleted/Renamed: Breakdown of different types of changes detected.

For each change detected, the report will list the details of the change, including the type of change (added, altered, deleted, renamed), the affected file's name, and any other relevant information.

Interpreting the Changes

  • [ADDED]: Files that are present in the new report but not in the old report.

  • [ALTERED]: Files with modified content between the old and new reports.

  • [DELETED]: Files that were present in the old report but are missing in the new report.

  • [RENAMED]: Files that have been renamed between the old and new reports.

By comparing scan reports, you can pinpoint changes and assess their impact, whether they indicate legitimate updates or potential security concerns.

Remember to replace report_1.json and report_2.json with the actual paths to the two scan reports you want to compare.

Example Output of a Comparison Report:

-------------------- CHANGE REPORT --------------------
Date:                2023-04-20T14:30:00+00:00
Scanned directories: Old report: /path/old_directory
                     New report: /path/new_directory
Total number of changes: 4
Number of files added:   1
Number of files altered: 1
Number of files deleted: 1
Number of files renamed: 1
[ADDED] new_file.txt
[ALTERED] modified_file.txt
[DELETED] deleted_file.txt
[RENAMED] old_name.txt -> new_name.txt
--------------------- REPORT END ----------------------

Last updated