From 7bea4c16e6f5d36b7cf2dd44e695c60fe1181619 Mon Sep 17 00:00:00 2001 From: thorinaboenke Date: Thu, 8 Oct 2026 14:53:28 +0200 Subject: [PATCH 01/40] fix typos in docs --- README.md | 2 +- docs/alert_aggregator.md | 2 +- docs/auxiliar/input_buffer.md | 2 +- docs/contribution.md | 14 ++--- docs/detectors.md | 4 +- docs/examples/others/basic_usage.py | 75 --------------------------- docs/examples/others/federation.py | 4 +- docs/parsers.md | 2 +- docs/parsers/template_tree_matcher.md | 2 +- docs/schemas.md | 2 +- docs/user_guide/basic_knowledge.md | 4 +- 11 files changed, 19 insertions(+), 94 deletions(-) delete mode 100644 docs/examples/others/basic_usage.py diff --git a/README.md b/README.md index 1f6050a2..72a284da 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The library contains the next components: * **Parsers**: parse the logs received from the reader. * **Detectors**: return alerts if anomalies are detected. * **Alert Aggregation**: aggregate the alerts produced by the detectors. -* **Schemas**: standard data classes use in DetectMate. +* **Schemas**: standard data classes used in DetectMate. ``` +--------+ +-----------+ +-------------------+ | Parser | --> | Detector | -> | Alert Aggregation | diff --git a/docs/alert_aggregator.md b/docs/alert_aggregator.md index 300d2a89..c70294db 100644 --- a/docs/alert_aggregator.md +++ b/docs/alert_aggregator.md @@ -7,7 +7,7 @@ Alert aggregation aggregates alerts from detectors. | **Input** | [DetectorSchema](schemas.md) | Alerts from detectors | | **Output** | [AggregateSchema](schemas.md) | Aggregated alerts | -This document explains expected APIs, how to implement a parser, testing tips and common pitfalls. +This document explains expected APIs, how to implement an alert aggregator, testing tips and common pitfalls. ## Overview diff --git a/docs/auxiliar/input_buffer.md b/docs/auxiliar/input_buffer.md index dcd7f17f..afb2295d 100644 --- a/docs/auxiliar/input_buffer.md +++ b/docs/auxiliar/input_buffer.md @@ -1,6 +1,6 @@ # Data Buffer -The data buffer is an auxiliar methods that can be use in all the components. It takes the stream data and formated to the specifications given. +The data buffer is an auxiliary method that can be used in all the components. It takes the stream data and formats it to the given specifications. It has different configuration states to configure its behaviour. diff --git a/docs/contribution.md b/docs/contribution.md index d517c2c8..64b81925 100644 --- a/docs/contribution.md +++ b/docs/contribution.md @@ -12,7 +12,7 @@ at least the following information in a bug report: 1. Description of the bug. Describe the problem clearly. 2. Steps to reproduce. With the following configuration, go to.., click.., see error -3. Expected behavoir. What should happen? +3. Expected behavior. What should happen? 4. Environment. What was the environment for the test(version, browser, etc..) *Please don't include any private/sensitive information in your issue! For reporting security-related issues, see [SECURITY.md](https://github.com/ait-detectmate/DetectMateLibrary/blob/main/SECURITY.md)* @@ -39,7 +39,7 @@ git clone -b development git@github.com:YOURUSERNAME/DetectMateLibrary.git ### 3. Create a feature branch -Every single workpackage should be developed in it's own feature-branch. Use a name that describes the feature: +Every single workpackage should be developed in its own feature-branch. Use a name that describes the feature: ```bash cd DetectMateLibrary @@ -48,7 +48,7 @@ git checkout -b feature-some_important_work ### 4. Develop your feature and improvements in the feature-branch -Please make sure that you commit only improvements that are related to the workpage you created the feature-branch for. +Please make sure that you commit only improvements that are related to the workpackage you created the feature-branch for. ### 5. Fetch and merge from the upstream @@ -103,13 +103,13 @@ git rebase -i HEAD~2 Delete your local feature-branch after the pull-request was merged into the development branch. -### 8. Update your local main branch +### 8. Update your local development branch Update your local development branch: ```bash git fetch upstream development -git checkout -b development +git checkout development git rebase upstream/development ``` @@ -117,9 +117,9 @@ Additional infos: - [https://www.atlassian.com/git/tutorials/merging-vs-rebasing](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) -### 9. Update your main branch in your github-repository +### 9. Update the development branch in your GitHub repository -Please make sure that you updated your local development branch as described in section 8. above. After that push the changes to your github-repository to keep it up2date: +Please make sure that you updated your local development branch as described in section 8. above. After that push the changes to your github-repository to keep it up to date: ```bash git push diff --git a/docs/detectors.md b/docs/detectors.md index cfabb06f..2460fbca 100644 --- a/docs/detectors.md +++ b/docs/detectors.md @@ -127,7 +127,7 @@ The detectors are numbered from simplest to most complex, and the sidebar lists Every detector page shows a minimal, working configuration file next to its example. The reference below explains the blocks those files use. -When `auto_config` is set to `False`, the detector expects an explicit `events` or `global` block that specifies exactly which variables to monitor. `events`refers to event-specific variables while `global` refers to variables, that are not bound to events (`header_variables`can but don't have to be event bound): +When `auto_config` is set to `False`, the detector expects an explicit `events` or `global` block that specifies exactly which variables to monitor. `events` refers to event-specific variables while `global` refers to variables, that are not bound to events (`header_variables` can but don't have to be event bound): ```yaml detectors: @@ -154,7 +154,7 @@ detectors: ### Common parameters (all detectors) -There are some parameters, that **every** detector inhertis from `CoreDetectorConfig`/`CoreConfig`/`BasicConfig`, regardless of what it does. The other parameters, that are **specific** for the respective detector, are explained right at the detectors documentation page, later on. +There are some parameters, that **every** detector inherits from `CoreDetectorConfig`/`CoreConfig`/`BasicConfig`, regardless of what it does. The other parameters, that are **specific** for the respective detector, are explained right at the detectors documentation page, later on. ???+ note "Top level" diff --git a/docs/examples/others/basic_usage.py b/docs/examples/others/basic_usage.py deleted file mode 100644 index dbf95c17..00000000 --- a/docs/examples/others/basic_usage.py +++ /dev/null @@ -1,75 +0,0 @@ -# flake8: noqa -log_path = "tests/test_data/logs.log" -templates_path = "tests/test_data/audit_templates.txt" -parsed_path = "parsed_logs.json" -log_json = "logs.json" -alert_path = "alerts.json" - - -# --8<-- [start:example_1] -from detectmatelibrary.parsers.template_matcher import MatcherParser -from detectmatelibrary.helper.from_to import From, To - - -config_dict = { - "parsers": { - "MatcherParser": { - "auto_config": True, - "method_type": "matcher_parser", - "path_templates": templates_path, - "log_format": r'type= msg=audit\(