Package: auditree-plant
auditree-plantThe Auditree tool for adding external evidence.IntroductionAuditreeplantis a command line tool that assists in adding evidence to an
evidence locker.  It provides a thoughtful way to add evidence to an
evidence locker by managing the evidence metadata so that checks and dependent fetchers
executed as part of theAuditree compliance frameworkcan apply
appropriate time to live validations.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--versionTheplanttool is available for download fromPyPI.InstallationIt is best practice, but not mandatory, to runplantfrom 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 ofplant, activate
your virtual environment and usepipto installplantlike so:../venv/bin/activate
pipinstallauditree-plantAs we add new features toplantyou will want to upgrade yourplantpackage.  To upgradeplantto the most recent version do:../venv/bin/activate
pipinstallauditree-plant--upgradeSeepip documentationfor additional options when usingpip.ConfigurationSince Auditreeplantinteracts with Git repositories, it requires Git remote
hosting service credentials in order to do its thing.  Auditreeplantwill by
default look for ausernameandtokenin a~/.credentialsfile.  You can
override the credentials file location by using the--credsoption on aplantCLI 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-tokenExecutionAuditreeplantis a simple CLI that performs the function of adding evidence
to an evidence locker.  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/plantfolder.  Both modes will also provide handy progress output asplantprocesses the new evidence.  However,push-remotewill push the changes
to the remote repository before removing the locally cloned copy whereasdry-runwill not.  When provided an absolute path to a local git repository using the--repo-pathoption,plantwill perform its plant-like duties as described
on the specified local git repository.  This can come in handy when looking to
chain yourplantexecution after a successful run of the compliance automation
fetchers and checks.As most CLIs, Auditreeplantcomes with a help facility.plant-hplantpush-remote-hplantdry-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/evidence detailkey/value pairs as you need as part of the--configor as contents of your--config-file.plantpush-remotehttps://github.com/org-foo/repo-bar--config'{"/absolute/path/to/my/evidence.ext":{"category":"foo"}}'plantpush-remotehttps://github.com/org-foo/repo-bar--config-file./path/to/my/config_file.jsonplantpush-remotehttps://github.com/org-foo/repo-bar--repo-path$TMPDIR"compliance"--config-file./path/to/my/config_file.jsondry-run modeUse thedry-runmode when you don't want your changes to be applied to the remote
evidence locker and are just interested in seeing what effect the execution will have
on your evidence locker before you commit to pushing your changes to the remote repository.
You can provide as manyevidence path/evidence detailkey/value pairs as you
need as part of the--configor as contents of your--config-file.plantdry-runhttps://github.com/org-foo/repo-bar--config'{"/absolute/path/to/my/evidence.ext":{"category":"foo"}}'plantdry-runhttps://github.com/org-foo/repo-bar--config-file./path/to/my/config_file.jsonplantdry-runhttps://github.com/org-foo/repo-bar--repo-path$TMPDIR"compliance"--config-file./path/to/my/config_file.json