From 39b48e083c52a39c2d71d1af0b289f40e15bd0d7 Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer <107021473+JanHoefelmeyer@users.noreply.github.com> Date: Tue, 28 Feb 2023 14:11:15 +0100 Subject: [PATCH] Improve docs for checker and downloader * make it more clear that a domain can also be interpreted as a direct URL. resolve #316 --------- Co-authored-by: JanHoefelmeyer Co-authored-by: Sascha L. Teichmann Co-authored-by: Bernhard Reiter --- cmd/csaf_checker/main.go | 4 ++-- docs/csaf_checker.md | 5 +++++ docs/csaf_downloader.md | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmd/csaf_checker/main.go b/cmd/csaf_checker/main.go index 7e860b8..dd94a78 100644 --- a/cmd/csaf_checker/main.go +++ b/cmd/csaf_checker/main.go @@ -162,7 +162,7 @@ func buildReporters() []reporter { } } -// run uses a processor to check all the given domains +// run uses a processor to check all the given domains or direct urls // and generates a report. func run(opts *options, domains []string) (*Report, error) { p, err := newProcessor(opts) @@ -189,7 +189,7 @@ func main() { errCheck(opts.prepare()) if len(domains) == 0 { - log.Println("No domains given.") + log.Println("No domain or direct url given.") return } diff --git a/docs/csaf_checker.md b/docs/csaf_checker.md index 2eb5421..3c52f9a 100644 --- a/docs/csaf_checker.md +++ b/docs/csaf_checker.md @@ -26,6 +26,11 @@ Help Options: -h, --help Show this help message ``` +Will check all given _domains_, by trying each as a CSAF provider. + +If a _domain_ starts with `https://` it is instead considered a direct URL to the `provider-metadata.json` and checking procedes from there. + + Usage example: ` ./csaf_checker example.com -f html --rate=5.3 -H apikey:SECRET -o check-results.html` diff --git a/docs/csaf_downloader.md b/docs/csaf_downloader.md index 91495ec..bf3f194 100644 --- a/docs/csaf_downloader.md +++ b/docs/csaf_downloader.md @@ -1,5 +1,5 @@ ## csaf_downloader -A tool to download CSAF content from a specific domain/provider. +A tool to download CSAF documents from CSAF providers. ### Usage @@ -20,3 +20,7 @@ Application Options: Help Options: -h, --help Show this help message ``` + +Will download all CSAF documents for the given _domains_, by trying each as a CSAF provider. + +If a _domain_ starts with `https://` it is instead considered a direct URL to the `provider-metadata.json` and downloading procedes from there.