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

516 commits

Author SHA1 Message Date
Sascha L. Teichmann
8f6e6ee8bb improve logging output 2023-10-17 18:52:38 +02:00
Bernhard Reiter
3923dc7044
fix: improve logging for downloader and aggregator
* use full name for printing out the used logfile for the downloader.
 * for debug or verbose, log the timeintervall that will be used
   for downloader and aggregator. (The checker has this as part
   of its output already.)
2023-10-17 11:33:03 +02:00
JanHoefelmeyer
5f2596665a Add new binary, the searcher(, the main and docs) from https://github.com/cintek/csaf_advisory_example+ 2023-10-12 12:07:40 +02:00
Sascha L. Teichmann
716f128754
Fix year folder check (#472) 2023-09-29 09:47:11 +02:00
Sascha L. Teichmann
1cc42f0ec0
Downloader: unit test forwarder (#470)
* Simplify forward method

* Add unit test for validation status

* Add unit test for stats logging in forwarder.

* Add unit test for http client creation.

* Add unit test for replaceExt

* Add unit test for buildRequest

* Add unit test for limitedString

* Add unit test for storeFailedAdvisory

* Add unit test for storeFailedAdvisory ... fixed

* Add unit test for storeFailed

* Add unit test for forward

* comment wording
2023-09-29 09:46:51 +02:00
Sascha L. Teichmann
7a8cdb6d19
Lift distribution from v2 to v3. (#467)
* v2 -> v3

* Increase version within Makefile

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-09-27 15:46:57 +02:00
JanHoefelmeyer
37f770ed3d
Merge pull request #463 from csaf-poc/downloader-unit-tests
Downloader: unit tests for stats
2023-09-27 12:16:05 +02:00
Sascha L. Teichmann
7cd076d4f8
Downloader: Remove verbose flag (#464)
* Remove verbose flag from downloader.

* Do structured http logging in forwarder, too.

* Use structured logging to separate http traffic of downloader from forwarder.
2023-09-27 11:30:24 +02:00
cintek
49da14d47f
feat: log redirects (#458)
* feat: log redirects

* improved logging and renamed function
2023-09-26 10:03:09 +02:00
Sascha L. Teichmann
fca3f5bb9b Fix stats unit test. 2023-09-25 23:32:19 +02:00
Sascha L. Teichmann
b0d7dbb387 Add unit test for stats. 2023-09-25 23:23:28 +02:00
JanHoefelmeyer
2a82c53585
Merge pull request #441 from csaf-poc/fix_missing
Checker: Fix checking of missing files
2023-09-19 15:52:05 +02:00
Sascha L. Teichmann
24151345f5
Drop time precision below seconds in log output. (#450) 2023-08-31 17:07:34 +02:00
Sascha L. Teichmann
018e0e55f7
Fix downloader logging docs and some comments. (#447) 2023-08-29 10:24:02 +02:00
Sascha L. Teichmann
5459f10d39
Downloader: Add structured logging, fails storing and statistics
* add  forwarding support in downloader

* Raise needed Go version to 1.21+ so slog can be used.

* Introduce validation mode flag (strict, unsafe)

* Add structured logging and place log into the download folder.

* Improve some code comment (bernhardreiter)

* Add counting stats to downloader.
2023-08-28 15:03:01 +02:00
Sascha L. Teichmann
e0475791ff
Downloader: Add forwarding to HTTP endpoint (#442)
* started with forwarding support in downloader

* Add missing files.

* Add missing files.

* Raise needed Go version

* More Go version bumping.

* Fix forwarding

* Go 1.21+ needed

* Make terminating forwarder more robust.

* Better var naming

* Remove dead code. Improve commentary.

* Prepare validation status adjustment.

* Move validations to functions to make them executable in a loop.

* Introduce validation mode flag (strict, unsafe)
2023-08-25 10:31:27 +02:00
Sascha L. Teichmann
4dfa2dd552 Dedup code a bit 2023-08-23 17:14:49 +02:00
JanHoefelmeyer
12815430ec Remove superflous reset of temporary variable 2023-08-23 13:22:28 +02:00
JanHoefelmeyer
8d51577e49 Use whereType for mistake 2023-08-23 12:58:40 +02:00
JanHoefelmeyer
4b56f3e837 Exchange slice with util.set for mistakes in checkMissing 2023-08-23 12:29:05 +02:00
JanHoefelmeyer
7651dc2a05 Sort missing files into errors 2023-08-23 11:40:37 +02:00
Sascha L. Teichmann
7d3c3a68df
Let aggregator look for config files in similiar places like the other tools. (#440) 2023-08-22 17:37:57 +02:00
Sascha L. Teichmann
f2657bb51a
uploader: use the TOML config file infrastructure, too. (#439)
* Make uploader use the TOML config file intrastructure, too.

* Improve method naming a bit.

* Improve method naming a bit.

* Add forgotten struct tags for TOML

* Add version to command line only parameters in uploader documentation

* Be explicit about supported options in config file.

* allow interactive flags in config file.

---------

Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
2023-08-22 17:17:06 +02:00
JanHoefelmeyer
5c935901ab
Make rolie or directory listing mandatory (#409)
* Changed infos to warnings and errors for Requirements 11-17 if said Requirements were not checked.

* Made a few more infos to warnings, slightly improved some messages in the reporters.

* Add explicite errors if badROLIEFeed and badFolders were not used.

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-08-19 10:59:37 +02:00
JanHoefelmeyer
824079899e
Error to explaining warning when loading lpmd messages in checker (#429)
* Error to explaining warning when loading lpmd messages in checker

* Remove TODO

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-08-18 11:29:30 +02:00
Sascha L. Teichmann
a153906d03
Document that client-passphrase option is experimental
* Label the option experimental and limited at all places.
 * Point to the downloader documentation as single point to write more.
 * Add more hints on how the old PEM block encryption is experimental
   and why it often shall not be used.
---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2023-08-18 11:24:39 +02:00
Sascha L. Teichmann
d49049c3af
Aggregator: Add time range filtering 2023-08-17 16:54:11 +02:00
Sascha L. Teichmann
4cd376a9ca Make revive happy. 2023-08-17 11:03:40 +02:00
Sascha L. Teichmann
468e91cb8b Remove the years flag from checker. 2023-08-17 11:01:45 +02:00
JanHoefelmeyer
7a202ddfdc merge branch 'main' into 'aggregator-client-certs' 2023-08-17 09:53:01 +02:00
JanHoefelmeyer
7a6cbd182c merge branch 'main' into checker-timerange-report 2023-08-17 09:35:52 +02:00
Sascha L. Teichmann
e2ad76fa69 Merge branch 'main' into aggregator-client-certs 2023-08-16 18:00:44 +02:00
Sascha L. Teichmann
3bfff999e1 Merge branch 'main' into downloader-client-certs 2023-08-16 17:54:53 +02:00
Sascha L. Teichmann
dd1e38fc0c Merge branch 'main' into checker-timerange-report 2023-08-16 17:47:27 +02:00
Sascha L. Teichmann
7bab18fc41
Checker: ignore advisories by given patterns
* Ignore advisories in checker.
---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-08-16 17:22:19 +02:00
Sascha L. Teichmann
7459f0606a Merge branch 'main' into aggregator-client-certs 2023-08-16 11:27:14 +02:00
Sascha L. Teichmann
a7be72b740 Merge branch 'main' into downloader-client-certs 2023-08-16 11:23:14 +02:00
Sascha L. Teichmann
fa0a66570f Merge branch 'main' into checker-timerange-report 2023-08-16 11:18:07 +02:00
Bernhard Reiter
6276866cad
Merge branch 'main' into download-ignore-pattern
* Improve some text parts during the merge.
2023-08-16 08:59:42 +02:00
Sascha L. Teichmann
8c95795b96
Add option to specify download folder
* Add an option to downloader to store advisories into a given subfolder.

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2023-08-16 08:45:34 +02:00
Sascha L. Teichmann
411d6ffd16 Merge branch 'main' into aggregator-client-certs 2023-08-15 18:58:28 +02:00
Sascha L. Teichmann
65f635d42d Merge branch 'main' into downloader-client-certs 2023-08-15 18:40:40 +02:00
Sascha L. Teichmann
16603eacd3 Merge branch 'main' into checker-timerange-report 2023-08-15 18:35:42 +02:00
Sascha L. Teichmann
f9fc7e773d Merge branch 'main' into download-ignore-pattern 2023-08-15 18:15:01 +02:00
Sascha L. Teichmann
d42db07bec
Fix version config and make aggreator use new command line parser. (#416)
* Fix version config and make aggreator use new command line parser.

* Replace old error check with check from the library.
2023-08-15 17:54:56 +02:00
Sascha L. Teichmann
47e55a33bc Add support for client certificates and extra headers to aggregator 2023-08-02 22:44:44 +02:00
Sascha L. Teichmann
f31ee53c27 Add client certificate support to the downloader 2023-08-02 21:16:32 +02:00
Sascha L. Teichmann
017a6b0a10 Move cert handling into library and add option passphrase. Adjust uploader and checker. 2023-08-02 21:02:58 +02:00
Sascha L. Teichmann
873eb4879b Add time range to checker report. 2023-08-02 20:01:04 +02:00
Sascha L. Teichmann
607bd0ebe1 Add ignore patterns to aggreagtor. 2023-08-01 22:16:14 +02:00