Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Please refer to the [NEWS](NEWS.md) for a list of changes which have an affect o
```
- added `severity` field to help with triaging received events (PR#2575 by Kamil Mańkowski).
To allow saving the field in PostgreSQL database in existing installations, the following schema update is necessary: `ALTER TABLE events ADD severity varchar(10);`.
- Implementing [IEP008](https://github.com/certtools/ieps/tree/main/008) introducing the `constituency` field for easier identification in
multi-constituency setups. (PR#2573 by Kamil Mańkowski)
To use in current PostgreSQL installations, a schema update may be
necessary: `ALTER TABLE events ADD "constituency" text;`.

### Bots
#### Collectors
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ALTER TABLE events ADD "product.vendor" text;
ALTER TABLE events ADD "product.version" text;
ALTER TABLE events ADD "product.vulnerabilities" text;
ALTER TABLE events ADD severity varchar(10);
ALTER TABLE events ADD "constituency" text;
```

### Configuration
Expand Down
4 changes: 4 additions & 0 deletions intelmq/etc/harmonization.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"description": "Free text commentary about the abuse event inserted by an analyst.",
"type": "String"
},
"constituency": {
"description": "Internal identifier for multi-constituency setup",
"type": "String"
},
"destination.abuse_contact": {
"description": "Abuse contact for destination address. A comma separated list.",
"type": "LowercaseString"
Expand Down
1 change: 1 addition & 0 deletions intelmq/lib/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@ def v350_new_fields(configuration, harmonization, dry_run, **kwargs):
"product.vendor",
"product.version",
"product.vulnerabilities",
"constituency",
]:
if field not in harmonization["event"]:
if field not in builtin_harmonisation["event"]:
Expand Down
1 change: 1 addition & 0 deletions intelmq/tests/bin/initdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CREATE TABLE events (
"classification.taxonomy" varchar(100),
"classification.type" text,
"comment" text,
"constituency" text,
"destination.abuse_contact" text,
"destination.account" text,
"destination.allocated" timestamp with time zone,
Expand Down
1 change: 1 addition & 0 deletions intelmq/tests/lib/test_upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ def test_v350_new_fields(self):
self.assertIn("severity", result[2]["event"])



for name in upgrades.__all__:
setattr(TestUpgradeLib, 'test_function_%s' % name,
generate_function(getattr(upgrades, name)))
Expand Down
Loading