feat(adv): rebase
command and library functionality
#1436
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new command:
wolfictl adv rebase
— along with the accompanying library functionality.This new command is useful for replaying the latest advisory event from one or more advisories in a "source" directory onto corresponding advisory data in a "destination" directory.
detection
events andfixed
events are not copied. Newly added events use the current timestamp so they'll pass validation. Any net new advisories are given a newly generated CGA ID.This is useful for when a package Melange file is copied from one repo to another, and the new instance of the package may have already accumulated some advisory data (e.g.
detection
events), but any conclusions from the original repo's advisory data should be applied to the new repo's advisory data as well.Syntax
Example
Note: This PR also smooths out the
testerfs
implementation to make it easier to use filesystem test fixtures to observe whether code under test had the desired impact on the filesystem.