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

104 commits

Author SHA1 Message Date
Sascha L. Teichmann
4da9f67e2e Distribute the validation to the types to reduce the overall complexity. 2023-09-09 21:15:25 +02:00
Christoph Klassen
ed42f193d1 added function to validate ProductTree 2023-09-08 20:04:04 +02:00
Christoph Klassen
f868b13c24 added function to validate document 2023-09-08 16:24:50 +02:00
Christoph Klassen
5a3661e81b use type FileHashValue 2023-09-08 14:52:48 +02:00
Christoph Klassen
dc41aae07f use up-to-date schema for CVSS 3.0 2023-09-07 08:48:34 +02:00
Christoph Klassen
4206c2e4b3 only using enums from CVSS 3.0 2023-09-06 15:51:47 +02:00
Christoph Klassen
b03df5508a added explanation for cvss3VectorStringPattern 2023-09-06 15:44:56 +02:00
Christoph Klassen
f45d273af9 fixed versionPattern 2023-09-05 19:53:48 +02:00
Sascha L. Teichmann
22ef2a925e Unexport patterns 2023-09-05 19:14:57 +02:00
Christoph Klassen
7f36ecb48c added missing types for CVSS2 + changed variable names for more consistency 2023-09-05 16:41:52 +02:00
Christoph Klassen
3acabdf73b reusing TLPLabel and Category from models.go 2023-09-04 17:41:44 +02:00
Christoph Klassen
4fc2fd9bf2 added omitempty for cvss structs 2023-09-04 16:06:47 +02:00
Christoph Klassen
f59a8cc7a9 use generated types 2023-09-04 15:58:28 +02:00
cintek
12d24647c6
Merge pull request #2 from s-l-teichmann/generate-cvss-enums
Add generator for CVSS enums
2023-09-04 15:10:48 +02:00
Sascha L. Teichmann
e821683423 Add generator for CVSS enums 2023-09-02 17:38:12 +02:00
Sascha L. Teichmann
96608a07fe Move defer.Close to right position. 2023-09-02 17:03:46 +02:00
Christoph Klassen
a1ea10baf9 feat: added model for a CSAF advisory 2023-09-01 20:14:18 +02:00
Sascha L. Teichmann
204ddb5a96 Use changes.csv instead of index.txt when using dir bases provider to make date filtering possible. 2023-07-26 03:56:05 +02:00
Sascha L. Teichmann
0ad4ed9e36 Expose logging as field in AdvisoryFileProcessor to shrink constructor signature. 2023-07-26 03:31:00 +02:00
Sascha L. Teichmann
de0599ebe3 Add time interval filtering to downloader. 2023-07-26 03:22:33 +02:00
Sascha L. Teichmann
8032d47b50
Use Set type (#388)
* Use util.Set type.

* Caught another set usage.
2023-07-04 13:00:01 +02:00
JanHoefelmeyer
b61912410a
Empty rolie (#357)
* 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>
2023-06-30 23:34:43 +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
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
21477e8004 Add missing file 2023-04-18 14:21:56 +02:00
Sascha L. Teichmann
1854678409 Started with cleaning up the provider metadata loading 2023-03-24 18:59:38 +01:00
Sascha L. Teichmann
3445e58e45 Unexport some symbols 2023-03-24 18:24:46 +01:00
Sascha L. Teichmann
0c2768b711 Fix header client. Simplify code. 2023-03-24 13:40:31 +01:00
JanHoefelmeyer
8f87273837
Remote validator output (#347)
* The validator is now able to print the details of the remote validations.
---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
2023-03-15 11:02:06 +01:00
Sascha L. Teichmann
aa574406cf
Upgrade jsonschema library to 5.2.0 (#349)
* make jsonschema loading work with current versions of the jsonschema library
   again and simplify the code while at it.
* Improve itest workflow for validation service, to make them more robust.
    * Use a github action to setup nodejs and use a version that is
       required by https://github.com/secvisogram/csaf-validator-service/.
    * Add nodejs16 installation to prepareUbuntuInstanceForITests.sh.
       (so it can be done once in manual settings)
    * Add refreshing of apt cache before apt install because sometimes
       the cached ubuntu image does not have the apt cache current.

---------

Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2023-03-10 10:39:23 +01:00
Sascha L. Teichmann
c15125a393 Fix copyright date 2023-01-19 16:45:26 +01:00
Sascha L. Teichmann
5b60e7d728 Add package comments to make revive happy. 2023-01-19 16:45:26 +01:00
Sascha L. Teichmann
c4b70d20cd Demand Go 1.19 in go.mod. Replaced interface{} with any 2023-01-19 16:45:26 +01:00
tschmidtb51
6b9ecead89 refactor: remove temporary solution joinUrlPath and use joinPath from Go 1.19.1 net/url 2022-09-24 18:53:03 +02:00
Sascha L. Teichmann
70b4e18b58
Treat invalid PMDs as error and stop processing if needed
*  Improve how PMD validation result is used when searching for a valid PMD.
   We now stop if no PMD can be validated against the json schema.
2022-08-26 16:53:18 +02:00
JanHoefelmeyer
3bb8ea0019
Improve checker regarding PMD location problems
* Change checking to test for Security, wellknown and DNS requirement at once and only throws error if all three fail.
* Use security.txt parser from csaf/util to extract provider url.
* Improve code comments and messages for the reports.

Co-authored-by: Jan Höfelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
Co-authored-by: Bernhard Reiter <bernhard@intevation.de>
2022-08-26 13:31:56 +02:00
Sascha L. Teichmann
37d8a8d6df Conversion provider -> publisher is not worth the method. 2022-08-16 12:28:14 +02:00
Sascha L. Teichmann
8e0812c82f add model for publishers in aggregator 2022-08-16 11:35:51 +02:00
Sascha L. Teichmann
050e225d07 Fix type assertions from directory_url expression result 2022-08-01 13:00:10 +02:00
Sascha L. Teichmann
dce3d1f4a7 load advisories via directory_urls 2022-08-01 06:46:05 +02:00
Sascha L. Teichmann
8af0aeea46 Write directory_urls in provider if write indices. 2022-07-30 12:20:21 +02:00
Bernhard E. Reiter
86fb441446
Change default port for secvisogram (#262)
* Change default port for secvisogram

 * Following change from
   https://github.com/secvisogram/csaf-validator-service/pull/14

* Improve script for setting up validation service

 * Add a test to fail if we cannot connect.
 * Add copyright header.
2022-07-26 15:13:02 +02:00
Sascha L. Teichmann
bed44e5e87 Do not silence errors when fetching a pmd 2022-07-26 12:06:14 +02:00
Sascha L. Teichmann
772e6351b8 Improved default logging prefix. 2022-07-23 16:29:38 +02:00
Sascha L. Teichmann
58ec57e1cb Avoid duplicate errors checking and logging when loading pmds. 2022-07-23 16:11:54 +02:00
Sascha L. Teichmann
d1855a9c30
Improve checks and messages for bad entries in files
* Ignore bad URLs in index.txt, improve messages.

resolve #158
2022-07-21 17:11:46 +02:00
Sascha L. Teichmann
4c1fdd2289
simplified loading of provider metadata in case of dns fallback. (#240) 2022-07-19 16:14:56 +02:00