1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Merge branch 'main' into checker-validator

This commit is contained in:
Sascha L. Teichmann 2023-01-30 19:30:36 +01:00
commit 1004fe7c65
4 changed files with 13 additions and 12 deletions

View file

@ -85,7 +85,7 @@ type config struct {
// ServiceDocument incidates if we should create a service.json document. // ServiceDocument incidates if we should create a service.json document.
ServiceDocument bool `toml:"create_service_document"` ServiceDocument bool `toml:"create_service_document"`
// UpdateInterval is used for publishers a the mandatory field // UpdateInterval is used for publishers as the mandatory field
// 'update_interval'. // 'update_interval'.
UpdateInterval *string UpdateInterval *string

View file

@ -111,11 +111,13 @@ in a `aggregator.category == "aggregator"` instance,
set `category` to `lister` in the entry. set `category` to `lister` in the entry.
Otherwise it is recommended to not set `category` for entries. Otherwise it is recommended to not set `category` for entries.
If a provider's domain starts with https:// its considered a publisher. If a provider's domain starts with `https://` it is considered a publisher.
These publishers are added to the csaf_publishers list instead of the csaf_providers list which was used before. These publishers are added to the `csaf_publishers` list, written
to the resulting `aggregator.json`.
The mandatory value of update_interval can be configured for each publisher (provider) individually. If not given it falls back Each publisher must announce an `update_interval` there.
to the global update_interval. If this is not given either the default is "on best effort". This can be configured for each entry, by the config option with the same name.
If not given it is taken from the configured default
Otherwise, the internal default "on best effort" is used.
#### Example config file #### Example config file
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../docs/examples/aggregator.toml) --> <!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../docs/examples/aggregator.toml) -->
@ -179,4 +181,4 @@ insecure = true
In case you want to provide CSAF advisories from others In case you want to provide CSAF advisories from others
that only qualify as CSAF publishers, see that only qualify as CSAF publishers, see
[how to use the `csaf_aggregator` for it](proxy-provider-for-aggregator.md). [how to use the `csaf_aggregator` as "CSAF proxy provider"](proxy-provider-for-aggregator.md).

View file

@ -5,7 +5,7 @@ calls it a *CSAF publisher*.
After manually downloading the advisories from such a publisher, After manually downloading the advisories from such a publisher,
the tools here can be used to offer the CSAF files for automated downloading the tools here can be used to offer the CSAF files for automated downloading
as *CSAF aggregator*. as *CSAF aggregator*. (The construct is called *CSAF proxy provider*. See [Section 7.2.5](https://docs.oasis-open.org/csaf/csaf/v2.0/csaf-v2.0.html#725-role-csaf-aggregator) for more details.)
There are three necessary steps, easiest is to use There are three necessary steps, easiest is to use
one single virtual maschine (or container) per internal provider. one single virtual maschine (or container) per internal provider.
@ -48,7 +48,7 @@ the path via the variable, normally set in `/etc/nginx/fcgiwrap.conf`:
(Careful: setting the variable a second time will transfer both values to (Careful: setting the variable a second time will transfer both values to
fcgiwrap via an array. It is not guaranteed that the last value will be fcgiwrap via an array. It is not guaranteed that the last value will be
used. So if you are thinking about setting this variable dynamically, used. So if you are thinking about setting this variable dynamically,
you need to make sure only once.) you need to make sure that is set only once.)
For example you can clone the files For example you can clone the files
```bash ```bash
@ -57,9 +57,8 @@ sudo vim /etc/nginx/fcgiwrap-p1.conf
sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/internal-p1-cgi sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/internal-p1-cgi
sudo ln -s /etc/nginx/sites-available/internal-p1-cgi /etc/nginx/sites-enabled/ sudo ln -s /etc/nginx/sites-available/internal-p1-cgi /etc/nginx/sites-enabled/
sudo vim /etc/nginx/sites-available/internal-p1-cgi sudo vim /etc/nginx/sites-available/internal-p1-cgi
and then set the right config and port like
``` ```
and then set the right config file and port like
```nginx ```nginx
include fcgiwrap-p1.conf; include fcgiwrap-p1.conf;

View file

@ -155,7 +155,7 @@ func TimeMatcher(dst *time.Time, format string) func(any) error {
} }
t, err := time.Parse(format, s) t, err := time.Parse(format, s)
if err != nil { if err != nil {
return nil return err
} }
*dst = t *dst = t
return nil return nil