A service that waits for security notices from wid.cert-bund.de and wid.lsi.bayern.de and sends configurable email notifications
Find a file
2023-10-11 23:41:05 +02:00
.gitignore Initial commit 2023-10-11 22:14:01 +02:00
datastore.go Initial commit 2023-10-11 22:14:01 +02:00
filter.go Initial commit 2023-10-11 22:14:01 +02:00
go.mod Initial commit 2023-10-11 22:14:01 +02:00
LICENSE Initial commit 2023-10-11 22:04:38 +02:00
mail.go Initial commit 2023-10-11 22:14:01 +02:00
main.go Added a bit more logging, handle errors from Recipient.filterAndSendNotices(), factor in delta t for the interval 2023-10-11 23:41:05 +02:00
notice.go Initial commit 2023-10-11 22:14:01 +02:00
README.md Replaced tab spaces in the README with whitespaces 2023-10-11 22:22:49 +02:00
template.go Initial commit 2023-10-11 22:14:01 +02:00
widapi.go Initial commit 2023-10-11 22:14:01 +02:00

WID Notifier

A tool that sends configurable email notifications for

Supported Platforms

This Software only supports Linux.

Config

Example:

{
  "api_fetch_interval": 600,
  "enabled_api_endpoints": [
    "bay",
    "bund"
  ],
  "datafile": "data",
  "recipients": [
    {
      "address": "guenther@example.org",,
      "include": [
        {"classification": "kritisch"},
        {"title_contains": "jQuery"}
      ]
    }
  ],
  "smtp": {
    "from": "WID Notifier \u003cfrom@example.org\u003e",
    "host": "example.org",
    "port": 587,
    "user": "from@example.org",
    "password": "SiEhAbEnMiChInSgEsIcHtGeFiLmTdAsDüRfEnSiEnIcHt"
  },
  "template": {
    "subject": "",
    "body": ""
  }
}

Filters

You must filter the notices to be sent per user. Multiple filters can be set per user and multiple criteria can be defined per filter.

"include": [
  {
    "any": false,
    "title_contains": "",
    "classification": "",
    "min_basescore": 0,
    "status": "",
    "products_contain": "",
    "no_patch": ""
  },
  ...
]

The following filter criteria are supported. Criteria marked with * are for optional fields that are not supported by every API endpoint (e.g. https://wid.lsi.bayern.de) - notices from those endpoints will therefore not be included when using those filters.

any

Includes all notices if set to true.

{"any": true}

title_contains

Include notices whose title contains this text.

{"title_contains": "Denial Of Service"}

If set to "", this criteria will be ignored.

classification

Include notices whose classification is in this list.
Classification can be "kritisch", "hoch", "mittel" or "niedrig".

{"classification": "hoch"}

If set to "", this criteria will be ignored.

min_basescore *

Include notices whose basescore (0 - 100) is >= min_basescore.

{"min_basescore": 40}

This criteria will be ignored if set to 0.

status *

Include notices with this status. This is usually either NEU or UPDATE.

{"status": "NEU"}

If set to "", this criteria will be ignored.

products_contain *

Include notices whose product list contains this text.

{"products_contain": "Debian Linux"}

If set to "", this criteria will be ignored.

no_patch *

If set to "true", notices where no patch is available will be included.

{"no_patch": "true"}

If set to "false", notices where no patch is available will be included.

{"no_patch": "false"}

If set to "", this criteria will be ignored.

Templates

The syntax for the mail templates is described here.

All fields from the WidNotice struct can be used.

type WidNotice struct {
  Uuid string
  Name string
  Title string
  Published time.Time
  Classification string
  // optional fields (only fully supported by cert-bund)
  Basescore int // -1 = unknown
  Status string // "" = unknown
  ProductNames []string // empty = unknown
  Cves []string // empty = unknown
  NoPatch string // "" = unknown
  // metadata
  PortalUrl string
}

For an example, take a look at DEFAULT_SUBJECT_TEMPLATE and DEFAULT_BODY_TEMPLATE in template.go.