* Use TOML as config file format.
* Parse command line a second time if config file was loaded.
* Handle default values correctly.
* Use same names for config file options and command line options.
* Create dummy structure to uniquely identify each advisory
* Remove dummy values, remove unused variable for now
* Formatting
* Add Evaluation of whether a white Advisory is access protected and add it to the respective slice, implement functionality
* Initialize p.whiteAdvisories before using it, stop sorting if no Client was used
* Ammend rules to include requirement 4, warning instead of error if white advisory is found protected, use badWhitePermissions.use()
* Formatting
* Fix typo: avaible -> available
* Improve check on whether building identifier failed
* Move extracting of tlp labels and related functions from processor to roliecheck
* Create Labelchecker and check access of white advisories regardless of whether ROLIE feeds exist. Only check Ranks if ROLIE feeds are used
* Formatting
* Do not use label checker as a pointer.
* Rename label checker
* Add XXX to questionable code.
* Simplify checking white advisories.
* Improve error message if no checks for accessibility of white advisories were done
* Extract TLP label directly without extractTLP function, consistent plural in error message
* Add comments and check type assertion in tlp label extraction.
* Move check for white advisories to label checker.
* Improve methods naming an comments.
* Address a few review questions.
* Move functionality of checkProtection fully into evaluateTLP
* Add comments and warn only if we are in a white feed or in a dirlisting.
---------
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
* Add info for Req 8-10 if direct url was given and as such no checks were performed.
* Update cmd/csaf_checker/processor.go
Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
* Break overly long lines
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
* Improve error message if filename does not match document/tracking/id and let it be reported by the proper reporter
* style: remove unnecessary "\n"
* style: convert space to tab to calm linter
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
* Create ROLIE feed if summaries are empty
* Formatting, Remove sorting of 0 elements
* Handle minimum entry length error as warning in checker
* Use empty array instead of creating an empty array to reference
* Change schema to allow for empty entry arrays
* Use https://raw.githubusercontent.com/oasis-tcs/csaf/81b2663697958bc5f85d14372712a40028fb8338/csaf_2.0/json_schema/ROLIE_feed_json_schema.json as schema for ROLIE feeds
* Change label name from empty to undefined
* Change default of create_service_document for csaf_provider to true
* Config
* Count entries in csaf-checker, warn if there are none.
* Add Comments to csaf/rolie.go's CountEntries function
* Delete index.txt and changes.csv in aggregator if there are no entries.
* Create an empty ROLIE feed document when setting up folders during create
* nit: set update time stamp in structure init.
* Instantiate label checker only once.
* Ignore domain not having roles.
* provider: Create empty entry section in ROLIE feed.
* Stop check for domain if PMD check fails
* Add missing continue statement
* Report missing ROLIE feed entries in ROLIE feed, not Provider Metadata
* Do not ommit empty entries in ROLIE feeds.
* Fixed error handling problem introduced by faulty merge. Removed unused errStop handling while there.
---------
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>