Skip to content

Commit 04c63a4

Browse files
authored
Merge branch 'develop' into shadowserver-dynamic-config
2 parents ac04471 + e22c1c2 commit 04c63a4

File tree

21 files changed

+250
-27
lines changed

21 files changed

+250
-27
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*.profile
1212
.vscode/
1313
.profile
14-
intelmq.egg-info
14+
*.egg-info
1515
build
1616
dist
1717
*.old

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
### Core
2424
- `intelmq.lib.message`: For invalid message keys, add a hint on the failure to the exception: not allowed by configuration or not matching regular expression (PR#2398 by Sebastian Wagner).
2525
- `intelmq.lib.exceptions.InvalidKey`: Add optional parameter `additional_text` (PR#2398 by Sebastian Wagner).
26+
- Change the way we discover bots to allow easy extending based on the entry point name. (PR#2413 by Kamil Mankowski)
2627
- `intelmq.lib.mixins`: Add a new class, `StompMixin` (defined in a new submodule: `stomp`),
2728
which provides certain common STOMP-bot-specific operations, factored out from
2829
`intelmq.bots.collectors.stomp.collector` and `intelmq.bots.outputs.stomp.output`
2930
(PR#2408 by Jan Kaliszewski).
3031

3132
### Development
33+
- Makefile: Add codespell and test commands (PR#2425 by Sebastian Wagner).
3234

3335
### Data Format
3436

@@ -68,11 +70,13 @@
6870

6971
### Documentation
7072
- Add a readthedocs configuration file to fix the build fail (PR#2403 by Sebastian Wagner).
73+
- Add a guide of developing extensions packages (PR#2413 by Kamil Mankowski)
7174
- Update/fix/improve the stuff related to the STOMP bots and integration with the *n6*'s
7275
Stream API (PR#2408 by Jan Kaliszewski).
7376
- Complete documentation overhaul. Change to markdown format. Uses the mkdocs-material (PR#2419 by Filip Pokorný).
7477

7578
### Packaging
79+
- Add `pendulum` to suggested packages, as it is required for the sieve bot (PR#2424 by Sebastian Wagner).
7680

7781
### Tests
7882

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ docs: mkdocs.yml docs/* intelmq/etc/feeds.yaml intelmq/etc/harmonization.conf in
1212
mkdocs build
1313

1414
clean:
15-
rm -rf docs_build .mypy_cache .coverage .pytest_cache dist
15+
rm -rf docs_build .mypy_cache .coverage .pytest_cache dist
16+
17+
codespell:
18+
codespell -x .github/workflows/codespell.excludelines
19+
20+
test:
21+
pytest --no-cov -v intelmq/tests/ && echo "Success!"

contrib/example-extension-package/mybots/__init__.py

Whitespace-only changes.

contrib/example-extension-package/mybots/bots/__init__.py

Whitespace-only changes.

contrib/example-extension-package/mybots/bots/collectors/__init__.py

Whitespace-only changes.

contrib/example-extension-package/mybots/bots/collectors/custom/__init__.py

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""
2+
SPDX-FileCopyrightText: 2023 CERT.at GmbH <https://cert.at/>
3+
SPDX-License-Identifier: AGPL-3.0-or-later
4+
"""
5+
6+
# Use your package as usual
7+
from mybots.lib import common
8+
9+
from intelmq.lib.bot import CollectorBot
10+
11+
12+
class ExampleAdditionalCollectorBot(CollectorBot):
13+
"""
14+
This is an example bot provided by an extension package
15+
"""
16+
17+
def process(self):
18+
report = self.new_report()
19+
if self.raw: # noqa: Set as parameter
20+
report['raw'] = common.return_value('example')
21+
self.send_message(report)
22+
23+
24+
BOT = ExampleAdditionalCollectorBot

contrib/example-extension-package/mybots/lib/__init__.py

Whitespace-only changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
3+
SPDX-FileCopyrightText: 2023 CERT.at GmbH <https://cert.at/>
4+
SPDX-License-Identifier: AGPL-3.0-or-later
5+
"""
6+
7+
8+
def return_value(value):
9+
return value

0 commit comments

Comments
 (0)