Clone evidence when cloning a report
Issue
Currently, only the findings are copied over when cloning a report, which means that the evidence for each finding will not be copied over.
Description of the Change
The updated functionality will clone all the evidence for each finding similarly to how each finding is cloned. Furthermore, the files will also be copied over on the filesystem, such that there is no link between the old and new report. If the files aren't copied over on the filesystem, then deleting the clone of the report will also delete the evidence files.
Alternate Designs
N/A
Possible Drawbacks
N/A
Verification Process
Create a new report with evidence. Clone the report. Verify that both reports have the evidence. Verify that deleting or modifying any of the evidence in one report doesn't affect the other report. Verify that deleting the any of the reports does not affect the evidence of the other report.
Release Notes
Clone evidence when cloning a report
Hey! This is a great change, @ly4k! I was just troubleshooting an issue the other day where this would have been handy and added it to my long list of things to look at. You have excellent timing 😄
I'll take a look at this as soon as I can. I might have some time this week, but it may be after Black Hat USA next week.
Awesome! 😃
Hey @ly4k,
I was ill in August and fell behind on this, but I've finished reviewing it. These changes look good! It just needs a check to make sure the evidence file to be copied still exists on the file system. I made the edit and wrote unit tests for the changes, but I'm unable to push changes to this PR. To proceed, you can make the changes and commit them or you can grant me access to this PR.
You should just need to check box next to "Allow edits from maintainers" to enable me (as a maintainer of Ghostwriter, the upstream repository)to commit changes to this PR for your fork.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork
Hey! I want to get this and changes from another PR into a release, so I've migrated the changes into the develop branch. I'm going to merge that branch and this PR will close.
Thanks again for taking the time to submit this!
Hello @chrismaddalena Hope you're back on top - and sorry for the late reply. I'm happy to see it merged! :)