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

715 commits

Author SHA1 Message Date
Sascha L. Teichmann
c6d0e9a9e2 Utilize new set type more. 2023-06-15 14:35:51 +02:00
Sascha L. Teichmann
71a3c3a13b Unify camel case spelling of message tracking. 2023-06-15 14:18:46 +02:00
Sascha L. Teichmann
b5d1924d3f Resolve TODOs concerning rule checking. 2023-06-15 14:16:07 +02:00
Sascha L. Teichmann
3e5137dd2f Add missing error check. 2023-06-15 13:56:10 +02:00
Sascha L. Teichmann
172c1cd85c Factored out set checks 2023-06-15 13:50:11 +02:00
JanHoefelmeyer
f74c5123c2 Add comments to categoryCheck and serviceCheck, add evaluation of category document contents 2023-06-15 11:47:26 +02:00
JanHoefelmeyer
d91af558ce Add ROLIE category document check for existence 2023-06-15 11:05:37 +02:00
JanHoefelmeyer
051de5194d implement rolieServiceReporter 2023-06-14 15:27:59 +02:00
JanHoefelmeyer
380ccfdf5a Add fetch of service category document from pmd url 2023-06-14 15:18:48 +02:00
JanHoefelmeyer
d7fb52b735 check whether rolie service document contains all feeds 2023-06-14 14:37:09 +02:00
Sascha L. Teichmann
fd374b30b6 Load ROLIE service by library function. 2023-06-14 12:56:55 +02:00
JanHoefelmeyer
719ecaea76 Add Requirements 18-20 to rules.go 2023-06-14 10:16:31 +02:00
JanHoefelmeyer
87dbb5674b Add badROLIEservice to processor 2023-06-14 09:50:12 +02:00
JanHoefelmeyer
f4f3efb197 Add function to load ROLIE service document 2023-06-14 09:46:42 +02:00
JanHoefelmeyer
7139f4dfa9 correct typos 2023-06-14 09:04:29 +02:00
Sascha L. Teichmann
8d45525e7f Made reporters 1-based to easy lookup. 2023-06-13 15:51:16 +02:00
Sascha L. Teichmann
51035c0dc9 Add comment 2023-06-13 13:34:35 +02:00
Sascha L. Teichmann
7501c60bf4 Implement rule depending error check. 2023-06-13 13:28:01 +02:00
Sascha L. Teichmann
c7453a6448 Be more precise with conditional rules. 2023-06-13 12:25:19 +02:00
JanHoefelmeyer
7eae607810
Merge pull request #370 from csaf-poc/fix-pmd-crash
Fix pmd crash
2023-06-09 13:17:42 +02:00
Sascha L. Teichmann
55540a32e0
Simplified requirement 15 (#369)
* Add badROLIEfeed as Topic Message

* Use badROLIEfeed to guarantee existant TLP labels White, Green or unlabeled. (Test not implemented)

* syntax

* Formatting

* Add Tlp check, completion struct

* Add mismatch to completion, add function checkCompletion to fill mismatch and also give an error if invalid tlp levels have been used

* formatting

* Add function to remove incomplete csaf feeds from list of complete csaf feeds for a given tlp level

* Add checkSummary function that checks whether a given feed would qualify as summary feed between all currently checked feeds

* Add completed check of tlp levels

* Add checks for correct hashes and signatures in ROLIE feed

* formatting

* Add rolieFeedReporter functionality

* fix typo

* Add todo, add return values to functions

* Switch error, ... return value so error returns last

* Fix typo

* Remove hash/sig checks that don't work, improve ROLIE message

* Add handling for advisories without tlp level

* Formatting

* Clean up rolie checks.

* Started with simplifying rolie checking

* Every ROLIE with data should have a summary.

* Clean up ROLIE feed label checker.

* if no TLP level can be extracted, return Unlabeled, not WHITE

* Add handling of advisories whose tlp exists, but has no label

* Also check TLP Red for completeness

* Only remove advisory from remain when it has exactly the right tlp color.

* Fix import in new rolie feed checker.

* Update comment to reflect current functionality

* Accept advisory of lesser tlp color in feed as completing.

* Collect advisory labels from advisories.

* Clarify that if no summary feed was found, it may exist but be either not listed or not accessible.

* Do not clone advisory lookup before.

* Move rolie check code to respective file.

---------

Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
2023-06-08 18:16:56 +02:00
JanHoefelmeyer
c3ef8e604c Give out warning instead of info if any of the provider-metadata.json lookups could not be performed. 2023-06-06 13:20:14 +02:00
JanHoefelmeyer
3ff7e16569
Merge pull request #372 from csaf-poc/fix-go-version-readme
We need at least Go 1.20
2023-06-06 08:10:16 +02:00
Sascha L. Teichmann
99cf30f660 We need at least Go 1.20 2023-06-05 10:26:31 +02:00
Bernhard E. Reiter
cf49c7e414
Fix go.mod and internal dependencies (#371)
* Use a "/v2" in the module path to match the git version tag which
   lead with a 2. Change all mention of the module as dependency
   internally as well.
2023-06-05 10:24:35 +02:00
JanHoefelmeyer
9d1000d773 Slightly improve phrasing 2023-06-02 13:32:55 +02:00
JanHoefelmeyer
3eced62af6 Stop checking a Provider Metadata if it could not be parsed 2023-06-02 13:30:28 +02:00
Bernhard Herzog
02d476360b
Merge pull request #366 from csaf-poc/cleanup_provider_metadata_loading
Prepare infrastructure for role based reporting
2023-05-16 17:53:18 +02:00
JanHoefelmeyer
4461bd6892
Merge pull request #365 from csaf-poc/filename-id
Check that filename matches /document/tracking/id
2023-05-16 08:50:48 +02:00
Sascha L. Teichmann
1dab0cc9ff Move code to more suited place. 2023-05-15 14:29:47 +02:00
Sascha L. Teichmann
a0b272a60d Deactivate TLP reporters 2023-05-15 14:15:20 +02:00
JanHoefelmeyer
150db4d31b Add new reporters to list of reporters in csaf_checker/main.go 2023-05-15 14:12:16 +02:00
Sascha L. Teichmann
068a94235c Add PMD loading errors to bad provider metadata report. 2023-05-15 14:01:27 +02:00
Sascha L. Teichmann
9ac902347c Fix revive 2023-05-15 13:54:21 +02:00
JanHoefelmeyer
aeff511895 Add reporters for missing requirements and their respective report functions 2023-05-15 13:49:27 +02:00
Sascha L. Teichmann
bd7831d7c3 Build reporters from role 2023-05-15 12:12:42 +02:00
Sascha L. Teichmann
018a1814f0 Fixed problem with JSON decoding in loading PMD 2023-05-15 10:43:16 +02:00
Sascha L. Teichmann
2e968b197d Removed old pmd loader. 2023-05-15 08:47:18 +02:00
Sascha L. Teichmann
e0928f58ad Port over logic to new PMD loader 2023-05-15 00:35:35 +02:00
Sascha L. Teichmann
dd15eea48e Fill typed messages for pmd loading 2023-05-12 11:05:05 +02:00
Sascha L. Teichmann
c4e9637f2b Re-use eval of processor. 2023-05-11 15:25:31 +02:00
Sascha L. Teichmann
d9fe7488d3 Merge branch 'main' into cleanup_provider_metadata_loading 2023-05-11 15:10:19 +02:00
Bernhard Herzog
821f018a98 Check that filename matches ID in csaf_uploader 2023-05-11 13:54:42 +02:00
Bernhard Herzog
5b4c621616 Check that filename matches ID in csaf_aggregator 2023-05-09 20:06:58 +02:00
Bernhard Herzog
6a91c29baf Check that filename matches ID in csaf_provider 2023-05-09 18:46:00 +02:00
Sascha L. Teichmann
c263391821
Be more verbose in case of signature check failures (#361)
* Simplify handling of signature keys. Be more verbose in case of signature check failures.

* Fixed check for having no OpenPGP loaded
2023-05-05 15:02:53 +02:00
Sascha L. Teichmann
f32fba683d
Add concurrent downloads to downloader. (#363)
* Add concurrent downloads to downloader.

* Moved to Go 1.20

* close files channel on producer side.

* Improve error handling

* New flag to ignore signature check results. Improve docs. Do not use number of CPUs to determine number of download workers.

* Set number of default workers in downloader to two.
2023-05-02 10:10:12 +02:00
Sascha L. Teichmann
91479c9912
Update 3rd party libraries. (#362) 2023-05-02 10:09:32 +02:00
Bernhard E. Reiter
8ad805e1e5
doc: improve rate default documentation (#364)
* doc: improve rate default documentation

solve #359

* Adjust downloader doc, too.

* doc(csaf_checker): Add missing phrase, correct spelling

* docs(csaf_checker): correct format mistake

---------

Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
2023-05-01 20:38:19 +02:00
Bernhard Herzog
c37b127d82 Check that filename matches ID in csaf_checker 2023-04-25 19:24:59 +02:00