"Walk" CSAF data from a remote server, allowing one to work with the data.
shell
csaf download -3 -v -d out/ https://www.redhat.com/.well-known/csaf/provider-metadata.json
```rust use anyhow::Result; use url::Url; use csafwalker::source::HttpSource; use csafwalker::walker::Walker; use csafwalker::fetcher::Fetcher; use csafwalker::retrieve::RetrievingVisitor; use csaf_walker::validation::{ValidatedAdvisory, ValidationError, ValidationVisitor};
async fn walk() -> Result<()> { let fetcher = Fetcher::new(Default::default()).await?; let source = HttpSource { url: Url::parse("https://www.redhat.com/.well-known/csaf/provider-metadata.json")?, fetcher, };
Walker::new(source.clone())
.walk(RetrievingVisitor::new(
source.clone(),
ValidationVisitor::new(
move |advisory: Result
Ok(()) } ```