pub async fn analyze(
grype: &Vec<String>,
syft: &Vec<String>,
trivy: &Vec<String>,
cyclone_dx: &Vec<String>,
context: &String,
out: &Option<String>
) -> Result<DeploymentScore, Error>
Expand description
The main entry point for the analysis process
Arguments
grype
- The grype files that describe a single piece of softwaretrivy
- The trivy files that describe a single piece of softwaresyft
- The syft files that describe a single piece of softwarecyclonedx
- The cyclonedx files that describe a single piece of software. Often conflicts withtrivy
context
- The context file that describes the deploymentout
- An optional output file to write the results to. If not specified, the results will be printed to stdout.
Returns
A Result
containing the DeploymentScore
or an Error
if an error occurred.
Examples
use scayl::analyze;
let score = analyze(
&vec!["/path/to/grype.json".to_string()],
&vec!["/path/to/trivy.json".to_string()],
&vec!["/path/to/syft.json".to_string()],
&vec![],
&Some("/path/to/context/file".to_string()),
&None
).unwrap();