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

733 commits

Author SHA1 Message Date
Sascha L. Teichmann
65536f51a4 Break overly long lines. Use defined constants for TLP levels. 2023-06-23 11:40:09 +02:00
JanHoefelmeyer
a02d9c36a7 Add check for should-be-access-protected advisories for not-authorized client. 2023-06-23 11:03:22 +02:00
JanHoefelmeyer
55f6a48db1 Remove solved TODO 2023-06-22 14:48:34 +02:00
Sascha L. Teichmann
daa4a6bf7a Add TODO for fulfilling requierement 4 2023-06-22 14:46:06 +02:00
Sascha L. Teichmann
594e6b4b0d Try to minimize redundant downloads. 2023-06-22 14:28:45 +02:00
JanHoefelmeyer
9967bfffe6 Amend checker docs to explain why authorization for RED/AMBER advisories needs to be genuine 2023-06-22 13:46:16 +02:00
JanHoefelmeyer
18732f26ba Amend checker docs to explain why authorization for RED/AMBER advisories needs to be genuine 2023-06-22 13:45:34 +02:00
JanHoefelmeyer
7dc1a6530e add badProviderMetadata to rules 2023-06-22 13:27:48 +02:00
JanHoefelmeyer
d393a42d61 Formatting permission check 2023-06-21 16:21:23 +02:00
JanHoefelmeyer
248e0a52a4 Enable Req 5 in rules.go 2023-06-21 15:38:40 +02:00
JanHoefelmeyer
ed26e8e41d Add Tests for Requirements 4 and 5 2023-06-21 15:35:00 +02:00
Sascha L. Teichmann
20bf16bd4f Add stubs for missing rule checks of providers. 2023-06-19 17:49:35 +02:00
Sascha L. Teichmann
421a05d421 Ignore domain not having roles. 2023-06-19 13:49:31 +02:00
JanHoefelmeyer
d5589a018d Change roliecheck.go: Now check whether no summary label exist, instead of incorrectly checking whether one exists 2023-06-16 17:15:39 +02:00
Sascha L. Teichmann
2ec8be4e8c Instantiate label checker only once. 2023-06-16 15:11:07 +02:00
JanHoefelmeyer
8d269ce106 No longer require optional distribution section in advisory to extract TLP label 2023-06-16 14:10:54 +02:00
JanHoefelmeyer
5614939562 Add offending file to error message for Requirements 16/17 2023-06-15 14:55:20 +02:00
Sascha L. Teichmann
a9dcfc26f3 Break some overly long lines. 2023-06-15 14:45:30 +02:00
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