1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Convert a lot of command line arguments to snake case (#498)

* Convert a lot of variables to snake case

* Add snakecase for variables made out of two words that had it in no version yet (for consistency)

* Adjust example files too

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
This commit is contained in:
JanHoefelmeyer 2023-11-06 14:33:05 +01:00 committed by GitHub
parent 77cc250561
commit 086c4ab48b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 83 additions and 83 deletions

View file

@ -6,7 +6,7 @@
csaf_aggregator [OPTIONS]
Application Options:
-t, --timerange=RANGE RANGE of time from which advisories to download
-t, --time_range=RANGE RANGE of time from which advisories to download
-i, --interim Perform an interim scan
--version Display version of the binary
-c, --config=TOML-FILE Path to config TOML file
@ -104,12 +104,12 @@ lock_file // path to lockfile, to stop other instances if one is n
interim_years // limiting the years for which interim documents are searched (default 0)
verbose // print more diagnostic output, e.g. https requests (default false)
allow_single_provider // debugging option (default false)
ignorepattern // patterns of advisory URLs to be ignored (see checker doc for details)
ignore_pattern // patterns of advisory URLs to be ignored (see checker doc for details)
client_cert // path to client certificate to access access-protected advisories
client_key // path to client key to access access-protected advisories
client_passphrase // optional client cert passphrase (limited, experimental, see downloader doc)
header // adds extra HTTP header fields to the client
timerange // Accepted time range of advisories to handle. See downloader docs for details.
time_range // Accepted time range of advisories to handle. See downloader docs for details.
```
Next we have two TOML _tables_:
@ -139,7 +139,7 @@ category
update_interval
create_service_document
categories
ignorepattern
ignore_pattern
client_cert
client_key
client_passphrase
@ -229,7 +229,7 @@ insecure = true
# If aggregator.category == "aggregator", set for an entry that should
# be listed in addition:
category = "lister"
# ignorepattern = [".*white.*", ".*red.*"]
# ignore_pattern = [".*white.*", ".*red.*"]
```
<!-- MARKDOWN-AUTO-DOCS:END -->

View file

@ -10,18 +10,18 @@ Application Options:
-o, --output=REPORT-FILE File name of the generated report
-f, --format=[json|html] Format of report (default: json)
--insecure Do not check TLS certificates from provider
--client-cert=CERT-FILE TLS client certificate file (PEM encoded data)
--client-key=KEY-FILE TLS client private key file (PEM encoded data)
--client-passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see downloader doc)
--client_cert=CERT-FILE TLS client certificate file (PEM encoded data)
--client_key=KEY-FILE TLS client private key file (PEM encoded data)
--client_passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see downloader doc)
--version Display version of the binary
-v, --verbose Verbose output
-r, --rate= The average upper limit of https operations per second (defaults to unlimited)
-t, --timerange=RANGE RANGE of time from which advisories to download
-i, --ignorepattern=PATTERN Do not download files if their URLs match any of the given PATTERNs
-t, --time_range=RANGE RANGE of time from which advisories to download
-i, --ignore_pattern=PATTERN Do not download files if their URLs match any of the given PATTERNs
-H, --header= One or more extra HTTP header fields
--validator=URL URL to validate documents remotely
--validatorcache=FILE FILE to cache remote validations
--validatorpreset= One or more presets to validate remotely (default: [mandatory])
--validator_cache=FILE FILE to cache remote validations
--validator_preset= One or more presets to validate remotely (default: [mandatory])
-c, --config=TOML-FILE Path to config TOML file
Help Options:
@ -50,7 +50,7 @@ insecure = false
# client_passphrase # not set by default
verbose = false
# rate # not set by default
# timerange # not set by default
# time_range # not set by default
# header # not set by default
# validator # not set by default
# validator_cache # not set by default

View file

@ -9,26 +9,26 @@ csaf_downloader [OPTIONS] domain...
Application Options:
-d, --directory=DIR DIRectory to store the downloaded files in
--insecure Do not check TLS certificates from provider
--ignoresigcheck Ignore signature check results, just warn on mismatch
--client-cert=CERT-FILE TLS client certificate file (PEM encoded data)
--client-key=KEY-FILE TLS client private key file (PEM encoded data)
--client-passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see doc)
--ignore_sigcheck Ignore signature check results, just warn on mismatch
--client_cert=CERT-FILE TLS client certificate file (PEM encoded data)
--client_key=KEY-FILE TLS client private key file (PEM encoded data)
--client_passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see doc)
--version Display version of the binary
-n, --nostore Do not store files
-n, --no_store Do not store files
-r, --rate= The average upper limit of https operations per second (defaults to unlimited)
-w, --worker=NUM NUMber of concurrent downloads (default: 2)
-t, --timerange=RANGE RANGE of time from which advisories to download
-t, --time_range=RANGE RANGE of time from which advisories to download
-f, --folder=FOLDER Download into a given subFOLDER
-i, --ignorepattern=PATTERN Do not download files if their URLs match any of the given PATTERNs
-i, --ignore_pattern=PATTERN Do not download files if their URLs match any of the given PATTERNs
-H, --header= One or more extra HTTP header fields
--validator=URL URL to validate documents remotely
--validatorcache=FILE FILE to cache remote validations
--validatorpreset=PRESETS One or more PRESETS to validate remotely (default: [mandatory])
-m, --validationmode=MODE[strict|unsafe] MODE how strict the validation is (default: strict)
--forwardurl=URL URL of HTTP endpoint to forward downloads to
--forwardheader= One or more extra HTTP header fields used by forwarding
--forwardqueue=LENGTH Maximal queue LENGTH before forwarder (default: 5)
--forwardinsecure Do not check TLS certificates from forward endpoint
--validator_cache=FILE FILE to cache remote validations
--validator_preset=PRESETS One or more PRESETS to validate remotely (default: [mandatory])
-m, --validation_mode=MODE[strict|unsafe] MODE how strict the validation is (default: strict)
--forward_url=URL URL of HTTP endpoint to forward downloads to
--forward_header= One or more extra HTTP header fields used by forwarding
--forward_queue=LENGTH Maximal queue LENGTH before forwarder (default: 5)
--forward_insecure Do not check TLS certificates from forward endpoint
--logfile=FILE FILE to log downloading to (default: downloader.log)
--loglevel=LEVEL[debug|info|warn|error] LEVEL of logging details (default: info)
-c, --config=TOML-FILE Path to config TOML file
@ -65,13 +65,13 @@ insecure = false
ignoresigcheck = false
# rate # set to unlimited
worker = 2
# timerange # not set by default
# time_range # not set by default
# folder # not set by default
# ignorepattern # not set by default
# ignore_pattern # not set by default
# header # not set by default
# validator # not set by default
# validatorcache # not set by default
validatorpreset = ["mandatory"]
# validator_cache # not set by default
validator_preset = ["mandatory"]
validation_mode = "strict"
# forward_url # not set by default
# forward_header # not set by default

View file

@ -9,16 +9,16 @@ Application Options:
-a, --action=[upload|create] Action to perform (default: upload)
-u, --url=URL URL of the CSAF provider (default: https://localhost/cgi-bin/csaf_provider.go)
-t, --tlp=[csaf|white|green|amber|red] TLP of the feed (default: csaf)
-x, --external-signed CSAF files are signed externally. Assumes .asc files beside CSAF files.
-s, --no-schema-check Do not check files against CSAF JSON schema locally.
-x, --external_signed CSAF files are signed externally. Assumes .asc files beside CSAF files.
-s, --no_schema_check Do not check files against CSAF JSON schema locally.
-k, --key=KEY-FILE OpenPGP key to sign the CSAF files
-p, --password=PASSWORD Authentication password for accessing the CSAF provider
-P, --passphrase=PASSPHRASE Passphrase to unlock the OpenPGP key
--client-cert=CERT-FILE.crt TLS client certificate file (PEM encoded data)
--client-key=KEY-FILE.pem TLS client private key file (PEM encoded data)
--client-passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see downloader doc)
-i, --password-interactive Enter password interactively
-I, --passphrase-interactive Enter OpenPGP key passphrase interactively
--client_cert=CERT-FILE.crt TLS client certificate file (PEM encoded data)
--client_key=KEY-FILE.pem TLS client private key file (PEM encoded data)
--client_passphrase=PASSPHRASE Optional passphrase for the client cert (limited, experimental, see downloader doc)
-i, --password_interactive Enter password interactively
-I, --passphrase_interactive Enter OpenPGP key passphrase interactively
--insecure Do not check TLS certificates from provider
-c, --config=TOML-FILE Path to config TOML file
--version Display version of the binary

View file

@ -10,8 +10,8 @@ csaf_validator [OPTIONS] files...
Application Options:
--version Display version of the binary
--validator=URL URL to validate documents remotely
--validatorcache=FILE FILE to cache remote validations
--validatorpreset= One or more presets to validate remotely (default: mandatory)
--validator_cache=FILE FILE to cache remote validations
--validator_preset= One or more presets to validate remotely (default: mandatory)
-o AMOUNT, --output=AMOUNT If a remote validator was used, display the results in JSON format
AMOUNT:

View file

@ -10,7 +10,7 @@ insecure = true
#interim_years =
#passphrase =
#write_indices = false
#timerange =
#time_range =
# specification requires at least two providers (default),
# to override for testing, enable:
@ -32,7 +32,7 @@ insecure = true
create_service_document = true
# rate = 1.5
# insecure = true
# timerange =
# time_range =
[[providers]]
name = "local-dev-provider2"
@ -54,4 +54,4 @@ insecure = true
# If aggregator.category == "aggreator", set for an entry that should
# be listed in addition:
category = "lister"
# ignorepattern = [".*white.*", ".*red.*"]
# ignore_pattern = [".*white.*", ".*red.*"]

View file

@ -14,8 +14,8 @@ echo '==== run checker (twice)'
cd ~/csaf_distribution
./bin-linux-amd64/csaf_checker -f html -o ../checker-results.html --insecure \
--client-cert ~/devca1/testclient1.crt \
--client-key ~/devca1/testclient1-key.pem \
--client_cert ~/devca1/testclient1.crt \
--client_key ~/devca1/testclient1-key.pem \
--verbose --insecure localhost
cat ../checker-results.html

View file

@ -23,7 +23,7 @@ for f in $(ls csaf_examples); do
../../bin-linux-amd64/csaf_uploader --insecure -P security123 -a upload \
-t ${TLPs[$((COUNTER++ % 4))]} \
-u https://localhost:8443/cgi-bin/csaf_provider.go \
--client-cert ~/devca1/testclient1.crt \
--client-key ~/devca1/testclient1-key.pem \
--client_cert ~/devca1/testclient1.crt \
--client_key ~/devca1/testclient1-key.pem \
./csaf_examples/"$f"
done