Module in_toto::runlib

source ·
Expand description

A tool that functionaries can use to create link metadata about a step.

Functions

  • Executes commands on a software supply chain step, then generates and returns its corresponding LinkMetadata as a Metablock component, wrapped in Result. If a symbolic link cycle is detected in the material or product paths, paths causing the cycle are skipped.
  • Reads and hashes an artifact given its path as a string literal, returning the VirtualTargetPath and TargetDescription of the file as a tuple, wrapped in Result.
  • Traverses through the passed array of paths, hashes the content of files encountered, and returns the path and hashed content in BTreeMap format, wrapped in Result. If a step in record_artifact fails, the error is returned.
  • Given command arguments, executes commands on a software supply chain step and returns the stdout, stderr, and return-value as byproducts in Result<ByProducts> format. If a commands in run_command fails to execute, Error is returned.