Skip to content

Commit f501963

Browse files
authored
Merge branch 'develop' into fix_amqp
2 parents 29da7b2 + 686cbe3 commit f501963

File tree

7 files changed

+49
-26
lines changed

7 files changed

+49
-26
lines changed

.github/workflows/build-docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
git config user.name intelmq-bot
4646
git config user.email intelmq-bot
4747
48+
- name: "Fix images path"
49+
run: |
50+
sed -i 's|docs/static/images/|static/images/|' docs/index.md
51+
4852
- name: "Build docs without publishing"
4953
if: github.event_name == 'pull_request'
5054
run: |

CHANGELOG.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- `intelmq.lib.upgrades`: Replace deprecated instances of `url2fqdn` experts by the new `url` expert in runtime configuration (PR#2432 by Sebastian Wagner).
3636
- `intelmq.lib.bot`: Ensure closing log files on reloading (PR#2435 by Kamil Mankowski).
3737
- AMQP Pipeline: fix SSL context to pointing to create a client-side connection that verifies the server (PR by Kamil Mankowski).
38+
- Only load the config once when starting intelmqctl (which makes IntelMQ API calls take less time) (PR#2444 by DigitalTrustCenter).
3839

3940
### Development
4041
- Makefile: Add codespell and test commands (PR#2425 by Sebastian Wagner).
@@ -63,11 +64,15 @@
6364
`ssl_ca_cert`, `ssl_cl_cert`, `ssl_cl_cert_key`.
6465
- Minor fixes/improvements and some refactoring (see also above: *Core*...).
6566
- `intelmq.bots.collectors.amqp`: fix SSL context to pointing to create a client-side connection that verifies the server (PR by Kamil Mankowski).
67+
- `intelmq.bots.collectors.shadowserver.collector_reports_api`:
68+
- The 'json' option is no longer supported as the 'csv' option provides better performance (PR#2372 by elsif2).
6669

6770
#### Parsers
68-
- `intelmq.bots.parsers.netlab_360.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
69-
- `intelmq.bots.parsers.webinspektor.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
70-
- `intelmq.bots.parsers.sucuri.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
71+
- `intelmq.bots.parsers.netlab_360.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
72+
- `intelmq.bots.parsers.webinspektor.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
73+
- `intelmq.bots.parsers.sucuri.parser`: Removed as the feed is discontinued. (#2442 by Filip Pokorný)
74+
- `intelmq.bots.parsers.shadowserver._config`:
75+
- Switch to dynamic configuration to decouple report schema changes from IntelMQ releases by regularly downloading them from the Shadowserver server (PR#2372 by elsif2).
7176

7277
#### Experts
7378
- `intelmq.bots.experts.jinja` (PR#2417 by Mikk Margus Möll):
@@ -103,6 +108,8 @@
103108
- Update/fix/improve the stuff related to the STOMP bots and integration with the *n6*'s
104109
Stream API (PR#2408 and PR#2414 by Jan Kaliszewski).
105110
- Complete documentation overhaul. Change to markdown format. Uses the mkdocs-material (PR#2419 by Filip Pokorný).
111+
- Adds warning banner if not browsing the latest version of the docs (PR#2445 by Filip Pokorný).
112+
- Fix logo path in index.md when building the docs (PR#2445 by Filip Pokorný).
106113

107114
### Packaging
108115
- Add `pendulum` to suggested packages, as it is required for the sieve bot (PR#2424 by Sebastian Wagner).
@@ -162,8 +169,6 @@
162169
- added support for `Subject NOT LIKE` queries,
163170
- added support for multiple values in ticket subject queries.
164171
- `intelmq.bots.collectors.rsync`: Support for optional private key, relative time parsing for the source path, extra rsync parameters and strict host key checking (PR#2241 by Mateo Durante).
165-
- `intelmq.bots.collectors.shadowserver.collector_reports_api`:
166-
- The 'json' option is no longer supported as the 'csv' option provides better performance.
167172

168173
#### Parsers
169174
- `intelmq.bots.parsers.shadowserver._config`:

docs/_overrides/main.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{#SPDX-FileCopyrightText: 2023 Filip Pokorný#}
2+
{#SPDX-License-Identifier: AGPL-3.0-or-later#}
3+
4+
{% extends "base.html" %}
5+
6+
{% block outdated %}
7+
You're not viewing the latest version.
8+
<a href="{{ '../' ~ base_url }}" style="color: black">
9+
<strong>Click here to go to latest.</strong>
10+
</a>
11+
{% endblock %}

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![CII Badge](https://bestpractices.coreinfrastructure.org/projects/4186/badge)](https://bestpractices.coreinfrastructure.org/projects/4186/)
88
-->
99

10-
![IntelMQ](/docs/static/images/Logo_Intel_MQ.svg)
10+
![IntelMQ](docs/static/images/Logo_Intel_MQ.svg)
1111

1212
# Introduction
1313

docs/user/bots.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,23 +2128,23 @@ correct mapping of the columns:
21282128

21292129
1. **Automatic report type detection**
21302130

2131-
Since IntelMQ version 2.1 the parser can detect the feed based on metadata provided by the collector.
2132-
2133-
When processing a report, this bot takes `extra.file_name` from the report and looks in `config.py` how the report
2134-
should be parsed. If this lookup is not possible, and the `feedname` is not given as parameter, the feed cannot be
2135-
parsed.
2136-
2137-
The field `extra.file_name` has the following structure: `%Y-%m-%d-${report_name}[-suffix].csv` where the optional
2138-
suffix can be something like `country-geo`. For example, some possible filenames
2139-
are `2019-01-01-scan_http-country-geo.csv` or `2019-01-01-scan_tftp.csv`. The important part is the `report_name`,
2140-
between the date and the suffix. Since version 2.1.2 the date in the filename is optional, so filenames
2141-
like `scan_tftp.csv` are also detected.
2131+
Since IntelMQ version 2.1 the parser can detect the feed based on metadata provided by the collector.
2132+
2133+
When processing a report, this bot takes `extra.file_name` from the report and looks in `config.py` how the report
2134+
should be parsed. If this lookup is not possible, and the `feedname` is not given as parameter, the feed cannot be
2135+
parsed.
2136+
2137+
The field `extra.file_name` has the following structure: `%Y-%m-%d-${report_name}[-suffix].csv` where the optional
2138+
suffix can be something like `country-geo`. For example, some possible filenames
2139+
are `2019-01-01-scan_http-country-geo.csv` or `2019-01-01-scan_tftp.csv`. The important part is the `report_name`,
2140+
between the date and the suffix. Since version 2.1.2 the date in the filename is optional, so filenames
2141+
like `scan_tftp.csv` are also detected.
21422142

21432143
2. **Fixed report type**
21442144

2145-
If the method above is not possible and for upgraded instances, the report type can be set with the `feedname`
2146-
parameter. Report type is derived from the subject of Shadowserver e-mails. A list of possible values of
2147-
the `feedname` parameter can be found in the table below in the column "Report Type".
2145+
If the method above is not possible and for upgraded instances, the report type can be set with the `feedname`
2146+
parameter. Report type is derived from the subject of Shadowserver e-mails. A list of possible values of
2147+
the `feedname` parameter can be found in the table below in the column "Report Type".
21482148

21492149
**Module:**
21502150

@@ -2200,6 +2200,7 @@ The schema revision history is maintained at https://github.com/The-Shadowserver
22002200
auto_update: true
22012201
run_mode: continuous
22022202
```
2203+
22032204
---
22042205

22052206
### Shodan <div id="intelmq.bots.parsers.shodan.parser" />

intelmq/bin/intelmqctl.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def __init__(self, interactive: bool = False, returntype: ReturnType = ReturnTyp
8787
self._parameters.logging_handler = 'file'
8888
self._parameters.logging_path = DEFAULT_LOGGING_PATH
8989

90+
try:
91+
self._runtime_configuration = utils.load_configuration(RUNTIME_CONF_FILE)
92+
except ValueError as exc: # pragma: no cover
93+
self.abort(f'Error loading {RUNTIME_CONF_FILE!r}: {exc}')
94+
9095
# Try to get logging_level from defaults configuration, else use default (defined above)
9196
defaults_loading_exc = None
9297
try:
@@ -203,11 +208,6 @@ def __init__(self, interactive: bool = False, returntype: ReturnType = ReturnTyp
203208
intelmqctl debug --get-environment-variables
204209
'''
205210

206-
try:
207-
self._runtime_configuration = utils.load_configuration(RUNTIME_CONF_FILE)
208-
except ValueError as exc: # pragma: no cover
209-
self.abort(f'Error loading {RUNTIME_CONF_FILE!r}: {exc}')
210-
211211
self._processmanagertype = getattr(self._parameters, 'process_manager', 'intelmq')
212212
if self._processmanagertype not in process_managers():
213213
self.abort('Invalid process manager given: %r, should be one of %r.' '' % (self._processmanagertype, list(process_managers().keys())))
@@ -384,7 +384,8 @@ def __init__(self, interactive: bool = False, returntype: ReturnType = ReturnTyp
384384
)
385385

386386
def load_defaults_configuration(self, silent=False):
387-
for option, value in utils.get_global_settings().items():
387+
global_settings = self._runtime_configuration.get('global', {})
388+
for option, value in global_settings.items():
388389
setattr(self._parameters, option, value)
389390

390391
# copied from intelmq.lib.bot, should be refactored to e.g. intelmq.lib.config

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ site_dir: docs_build
1919
theme:
2020
name: material
2121
logo: static/images/Logo_Intel_MQ.svg
22+
custom_dir: docs/_overrides
2223
palette:
2324
# Palette toggle for light mode
2425
- scheme: default

0 commit comments

Comments
 (0)