Package: auditree-prune
auditree-pruneThe Auditree evidence removal tool.IntroductionAuditreepruneis a command line tool that assists in managing evidence locker
abandoned evidence.  It provides a thoughtful way to remove evidence from an
evidence locker while retaining the evidence metadata so that, if necessary,
retrieving the removed evidence from git history is made easier.  Auditreeprunedoes this by handling the removal of the evidence file(s) from an evidence locker
git repository and providing "tombstoned" metadata that can be used to map back to
a point in time where the evidence still existed in the evidence locker.PrerequisitesSupported for execution on OSX and LINUX.Supported for execution with Python 3.6 and above.Python 3 must be installed, it can be downloaded from thePythonsite or installed using your package manager.Python version can be checked with:python--versionorpython3--versionTheprunetool is available for download fromPyPI.InstallationIt is best practice, but not mandatory, to runprunefrom a dedicated Python
virtual environment.  Assuming that you have the Pythonvirtualenvpackage already installed, you can create a virtual environment namedvenvby
executingvirtualenv venvwhich will create avenvfolder at the location of
where you executed the command.  Alternatively you can use the pythonvenvmodule
to do the same.python3-mvenvvenvAssuming that you have a virtual environment and that virtual environment is in
the current directory then to install a new instance ofprune, activate
your virtual environment and usepipto installprunelike so:../venv/bin/activate
pipinstallauditree-pruneAs we add new features topruneyou will want to upgrade yourprunepackage.  To upgradepruneto the most recent version do:../venv/bin/activate
pipinstallauditree-prune--upgradeSeepip documentationfor additional options when usingpip.ConfigurationSince Auditreepruneinteracts with Git repositories, it requires Git remote
hosting service credentials in order to do its thing.  Auditreeprunewill by
default look for ausernameandtokenin a~/.credentialsfile.  You can
override the credentials file location by using the--credsoption on apruneCLI execution. Valid section headings includegithub,github_enterprise,bitbucket,
andgitlab.  Below is an example of the expected credentials entry.[github]username=your-gh-usernametoken=your-gh-tokenExecutionAuditreepruneis a simple CLI that performs the function of archiving off
abandoned evidence.  As such, it has two execution modes; apush-remotemode and
adry-runmode.  Both modes will clone a git repository and place it into the$TMPDIR/prunefolder.  Both modes will also provide handy progress output aspruneprocesses the abandoned evidence.  The final step in both modes is to remove
the locally cloned repository from the temp directory.  However,push-remotewill
push the changes to the remote repository before removing the locally cloned copy
whereasdry-runwill not.As most CLIs, Auditreeprunecomes with a help facility.prune-hprunepush-remote-hprunedry-run-hpush-remote modeUse thepush-remotemode when you want your changes to be applied to the remote
evidence locker.  You can provide as manyevidence path/reason for removalkey/value pairs as you need as part of the--configor as contents of your--config-file.prunepush-remotehttps://github.com/org-foo/repo-bar--config'{"raw/foo/bar.json":"bar.json is abandoned",...}'prunepush-remotehttps://github.com/org-foo/repo-bar--config-file./path/to/my/prune/evidence.jsondry-run modeUse thedry-runmode when you want don't your changes to be applied to the remote
evidence locker and are just interested in seeing what effect the execution will have
on our evidence locker before you commit to pushing your changes to the remote repository.
You can provide as manyevidence path/reason for removalkey/value pairs as you
need as part of the--configor as contents of your--config-file.prunedry-runhttps://github.com/org-foo/repo-bar--config'{"raw/foo/bar.json":"bar.json is abandoned",...}'prunedry-runhttps://github.com/org-foo/repo-bar--config-file./path/to/my/prune/evidence.json