Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
b0dc60e
use cli to start service only
thorinaboenke Jan 8, 2026
6806200
add webserver
thorinaboenke Jan 8, 2026
874c221
add webserver settings
thorinaboenke Jan 8, 2026
8de5ffd
change start stop run and shutdown logic of service and engine
thorinaboenke Jan 8, 2026
6bd1b49
always enable webserver
thorinaboenke Jan 12, 2026
f8a6371
remove manager
thorinaboenke Jan 12, 2026
e797ab9
remove manager tests
thorinaboenke Jan 12, 2026
c6a5b66
use json instead of string for reconfigure
thorinaboenke Jan 19, 2026
0b581ce
typo
thorinaboenke Jan 19, 2026
48a3bc8
use json instead of string for reconfigure in router
thorinaboenke Jan 19, 2026
ef4de89
remove nano message admin cli
thorinaboenke Jan 19, 2026
f0db770
validation against ServiceConfig
thorinaboenke Jan 20, 2026
7b462e7
add detectmate-client cli
thorinaboenke Jan 20, 2026
d0a9afc
update demo settings
thorinaboenke Jan 20, 2026
2f91256
Merge branch 'main' into feature_fast_api_rewrite
thorinaboenke Jan 20, 2026
b80f659
update docs
thorinaboenke Jan 20, 2026
6d7ec7e
update readme
thorinaboenke Jan 20, 2026
62b8673
typo
thorinaboenke Jan 20, 2026
b0c07e5
empty lines
thorinaboenke Jan 20, 2026
68beac5
remove pass from abtract method
thorinaboenke Jan 20, 2026
23e76ba
Merge pull request #23 from ait-detectmate/feature_fast_api_rewrite
whotwagner Jan 20, 2026
26cc11d
add metrics endpoint
thorinaboenke Jan 26, 2026
b6e3ab2
add dependencies
thorinaboenke Jan 26, 2026
d8441e1
add metrics to detectmate client
thorinaboenke Jan 26, 2026
abd541c
rename metric
thorinaboenke Jan 26, 2026
eba58c1
fix imports
thorinaboenke Jan 26, 2026
f7f7de8
add metrics for processed bytes
thorinaboenke Jan 27, 2026
9870fc3
avoid counter ducplcation in registry
thorinaboenke Jan 27, 2026
81c8a67
make service_running metric Enum
thorinaboenke Jan 27, 2026
eabf38d
move run out of Engine init
thorinaboenke Jan 29, 2026
5054138
Merge pull request #38 from ait-detectmate/fix/code_quality_issues
whotwagner Jan 29, 2026
f1d987b
add docs on service library interface
thorinaboenke Jan 29, 2026
f02d9ff
add docs on library imports in service
thorinaboenke Jan 29, 2026
7a24af4
add imports to index!
thorinaboenke Jan 29, 2026
53c6cf7
Updated docs
whotwagner Feb 2, 2026
580e450
Moved images to docs
whotwagner Feb 2, 2026
82bbb52
Added SECURITY.md
whotwagner Feb 2, 2026
f722730
Updated README
whotwagner Feb 2, 2026
6549b88
Installed issue and pr-templates
whotwagner Feb 2, 2026
911fb54
Added development.md
whotwagner Feb 2, 2026
6969975
Improved development.md
whotwagner Feb 2, 2026
6edb2a5
Updated README
whotwagner Feb 2, 2026
8872ffc
Updated development.md
whotwagner Feb 2, 2026
f4e58a8
Merge pull request #39 from ait-detectmate/feature/docs_on_library_se…
whotwagner Feb 2, 2026
c956211
Fixed docs-conflict
whotwagner Feb 2, 2026
7e75e9d
prek: exclude docs
whotwagner Feb 2, 2026
4bbbf5f
Merge pull request #30 from ait-detectmate/feature_metrics_endpoint
whotwagner Feb 2, 2026
dc01240
Merge pull request #44 from ait-detectmate/feature_docs
whotwagner Feb 2, 2026
c78d5c2
Update pre-commit config to exclude .github directory
whotwagner Feb 2, 2026
91651e7
updated uv.lock
whotwagner Feb 2, 2026
0538d34
Fixed whitespaces
whotwagner Feb 2, 2026
4cd1ab6
Update development.md with manual check instructions
whotwagner Feb 2, 2026
11625c6
Added script to select proper library-version during tests
whotwagner Feb 3, 2026
9db8c02
Added output for change_toml.sh
whotwagner Feb 3, 2026
9f662a7
Deactivated integration-tests
whotwagner Feb 3, 2026
95ed0ff
Deactivated tests with reconfigure_service
whotwagner Feb 3, 2026
e574a73
Updated README
whotwagner Feb 3, 2026
710188d
use new service settings schema in engine multi output test
thorinaboenke Feb 3, 2026
76159eb
mkdocs
thorinaboenke Feb 3, 2026
0183f54
use fastapi in serice multi output integrastion tests
thorinaboenke Feb 3, 2026
4edc61a
Merge branch 'fix_branchbased_ci' of https://github.com/ait-detectmat…
thorinaboenke Feb 3, 2026
d2d3f6a
uv lock
thorinaboenke Feb 3, 2026
8a22a26
add pyproject.toml
thorinaboenke Feb 3, 2026
d1e2af4
update test component id
thorinaboenke Feb 4, 2026
700c4b0
update egine looptest
thorinaboenke Feb 4, 2026
15dca7e
update smoe service test
thorinaboenke Feb 4, 2026
7afa5a7
update reconfigure tests
thorinaboenke Feb 4, 2026
085e0a3
Merge pull request #46 from ait-detectmate/fix_branchbased_ci
whotwagner Feb 4, 2026
1e0f35a
Update pull_request_template.md
whotwagner Feb 4, 2026
908eb17
join thread before closing sockets in engine.stop
thorinaboenke Feb 5, 2026
0605b6b
Merge pull request #48 from ait-detectmate/fix/deadlock_in_multi_outp…
whotwagner Feb 5, 2026
5894cce
added metadata.py
whotwagner Feb 5, 2026
65f57ec
style fixes
whotwagner Feb 5, 2026
b3cf35c
Merge pull request #50 from ait-detectmate/feature_dynamic_version
thorinaboenke Feb 5, 2026
d2050a7
Potential fix for pull request finding 'Statement has no effect'
whotwagner Feb 5, 2026
c2462fb
Style fix
whotwagner Feb 5, 2026
d8ad944
Merge pull request #51 from ait-detectmate/development
thorinaboenke Feb 5, 2026
c76629b
Bump pytest from 8.4.1 to 9.0.2
dependabot[bot] Feb 5, 2026
062684f
Bump pytest-cov from 6.2.1 to 7.0.0
dependabot[bot] Feb 5, 2026
52f4af6
Bump pydantic from 2.11.7 to 2.12.5
dependabot[bot] Feb 5, 2026
d066f00
Bump pydantic-settings from 2.10.1 to 2.12.0
dependabot[bot] Feb 5, 2026
b675e26
Bump protobuf from 6.33.1 to 6.33.5
dependabot[bot] Feb 5, 2026
e7bc303
Bump prek from 0.2.16 to 0.3.0
dependabot[bot] Feb 5, 2026
8562424
Merge pull request #45 from ait-detectmate/dependabot/uv/protobuf-6.33.5
whotwagner Feb 5, 2026
bf91f5a
Merge pull request #37 from ait-detectmate/dependabot/uv/pydantic-2.12.5
whotwagner Feb 5, 2026
6de6cdd
Merge pull request #36 from ait-detectmate/dependabot/uv/pytest-9.0.2
whotwagner Feb 5, 2026
169a0b0
Merge pull request #35 from ait-detectmate/dependabot/uv/pytest-cov-7…
whotwagner Feb 5, 2026
8d9f00e
Merge pull request #34 from ait-detectmate/dependabot/uv/pydantic-set…
whotwagner Feb 5, 2026
f02437d
Merge pull request #33 from ait-detectmate/dependabot/uv/prek-0.3.0
whotwagner Feb 5, 2026
8a8d01f
Bump version from 0.1.0 to 0.1.1
thorinaboenke Feb 5, 2026
259fadd
Merge pull request #53 from ait-detectmate/bump-version-to-0.1.1
whotwagner Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: 🐜 Bug report
about: If something isn't working 🔧
---

### Subject of the issue
Describe your issue here.

### Your environment
* Version of ruby
* Docker or manual installation?
* Which browser and its version

### Steps to reproduce
Tell us how to reproduce this issue.

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: 🚀 Feature request
about: If you have a feature request 💡
---

**Context**

What are you trying to do and how would you want to do it differently? Is it something you currently you cannot do? Is this related to an issue/problem?

**Alternatives**

Can you achieve the same result doing it in an alternative way? Is the alternative considerable?

**Has the feature been requested before?**

Please provide a link to the issue.

**If the feature request is approved, would you be willing to submit a PR?**

Yes / No _(Help can be provided if you need assistance submitting a PR)_

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Task
<!-- Please add link a relevant issue or task -->

# Description
<!-- Please include a summary of the change -->
<!-- Any details that you think are important to review this PR? -->
<!-- Are there other PRs related to this one? -->

# How Has This Been Tested?
<!-- Please describe how you tested your changes -->

# Checklist
<!-- Go over all the following points, and put an `x` in all the boxes that apply -->

- [ ] This Pull-Request goes to the **development** branch.
- [ ] I have successfully run prek locally.
- [ ] I have added tests to cover my changes.
- [ ] I have linked the issue-id to the task-description.
- [ ] I have performed a self-review of my own code.
14 changes: 7 additions & 7 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Python application

on:
push:
branches: [ "main" ]
branches: [ "main", "development" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "development" ]

permissions:
contents: read
Expand All @@ -28,11 +28,11 @@ jobs:
activate-environment: true
enable-cache: true

- name: Install project deps
run: uv pip install -e .[dev]
- name: Use specific detematelibrary version
run: chmod +x scripts/change_toml.sh && scripts/change_toml.sh $GITHUB_BASE_REF

- name: Run pre-commit with prek
run: uv run prek run -a

run: uv run --dev prek run -a
- name: Test with pytest
run: uv run pytest
run: uv run --dev pytest --ignore tests/library_integration
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: '.*.log'
exclude: '.*.log|.github/.*|docs/.*'
repos:

# Core cleanup
Expand All @@ -20,6 +20,11 @@ repos:
- id: check-symlinks
- id: check-toml

- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [--in-place, --remove-all-unused-imports, --remove-unused-variables]
# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
Expand All @@ -31,15 +36,15 @@ repos:
- pydantic
- types-PyYAML
- pydantic-settings
- types-requests

# Code formatting
- repo: https://github.com/hhatto/autopep8
rev: v2.3.2
hooks:
- id: autopep8
args: [--max-line-length=110, --diff]
args: [--max-line-length=110, --in-place]

# Linting
- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
hooks:
Expand All @@ -59,12 +64,6 @@ repos:
- id: bandit
exclude: ^tests/

# Unused code detection
- repo: https://github.com/jendrikseipp/vulture
rev: v2.14
hooks:
- id: vulture
args: [--min-confidence=70, src/]

# Log and syntax pattern checks
- repo: https://github.com/pre-commit/pygrep-hooks
Expand Down
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ If you plan to contribute to the development of this package, follow these steps

```bash
uv sync --dev
uv run prek install
uv run --dev prek install
```

Run the tests:

```bash
uv run pytest -q
uv run --dev pytest -q
```

Run the tests with coverage (add `--cov-report=html` to generate an HTML report):

```bash
uv run pytest --cov=. --cov-report=term-missing
uv run --dev pytest --cov=. --cov-report=term-missing
```


Expand Down Expand Up @@ -73,19 +73,31 @@ Example configuration files can be found in the `tests/config` directory.
Start the service:

```bash
uv run detectmate start --settings examples/service_settings.yaml
uv run detectmate --settings examples/service_settings.yaml
```
To survey the state of your component and interact with the running service, use the detectmate-client tool.

Get the service status:

```bash
uv run detectmate status --settings examples/service_settings.yaml
uv run detectmate-client status --url <http_host:http_port>
```

Stop the service:
Stop the engine:

```bash
uv run detectmate stop --settings examples/service_settings.yaml
uv run detectmate-client stop --url <http_host:http_port>
```

Start the engine:
```bash
uv run detectmate-client start --url <http_host:http_port>
```

Shutdown entire service:

```bash
uv run detectmate-client shutdown --url <http_host:http_port>
```


Expand All @@ -108,7 +120,15 @@ docker compose up demo

## Documentation

- [Project Documentation](https://ait-detectmate.github.io/DetectMateService/)
- [Project Documentation](https://ait-detectmate.github.io/DetectMateService/latest)

## Contribution

We're happily taking patches and other contributions. Please see the following links for how to get started:

- [GitHub Workflow](https://ait-detectmate.github.io/DetectMateService/latest/Contribution)

If you encounter any bugs, please create an issue on [Github](https://github.com/ait-detectmate/DetectMateService/issues).

## License

Expand Down
32 changes: 32 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 1.x.x | :white_check_mark: |
| < 1.0.0 | :x: |

> [!IMPORTANT]
> Currently DetectMateService is a work in progress and heavily under development. Possible vulnerabilities will not be treated any special and can be issued using [GitHub-Issues](https://github.com/ait-detectmate/DetectMateService/issues)

## Reporting a Vulnerability

Please email reports about any security related issues you find to aecid@ait.ac.at. This mail is delivered to a small developer team. Your email will be acknowledged within one business day, and you'll receive a more detailed response to your email within 7 days indicating the next steps in handling your report.

Please use a descriptive subject line for your report email. After the initial reply to your report, our team will endeavor to keep you informed of the progress being made towards a fix and announcement.

In addition, please include the following information along with your report:

* Your name and affiliation (if any).
* A description of the technical details of the vulnerabilities. It is very important to let us know how we can reproduce your findings.
* An explanation who can exploit this vulnerability, and what they gain when doing so -- write an attack scenario. This will help us evaluate your report quickly, especially if the issue is complex.
* Whether this vulnerability public or known to third parties. If it is, please provide details.
* Whether we could mention your name in the changelogs.

Once an issue is reported we use the following disclosure process:

* When a report is received, we confirm the issue and determine its severity.
* If we know of specific third-party services or software based on DetectMateService that require mitigation before publication, those projects will be notified.
* Fixes are prepared for the last minor release of the latest major release.
* Patch releases are published for all fixed released versions.
3 changes: 2 additions & 1 deletion demo/config/detector_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
component_type: "detectors.new_value_detector.NewValueDetector"
component_config_class: "detectors.new_value_detector.NewValueDetectorConfig"
component_name: "test-nvd"
manager_addr: "tcp://detector:8020"
http_host: "127.0.0.1"
http_port: 8020
engine_addr: "tcp://detector:8021"
log_level: "DEBUG"
log_dir: "./logs"
Expand Down
4 changes: 2 additions & 2 deletions demo/config/ipc/detector_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
component_type: "detectors.new_value_detector.NewValueDetector"
component_config_class: "detectors.new_value_detector.NewValueDetectorConfig"
component_name: "test-nvd"
manager_addr: "ipc:///tmp/test_nvd_cmd.ipc"
http_host: "127.0.0.1"
http_port: 8020
engine_addr: "ipc:///tmp/test_nvd_engine.ipc"

log_level: "DEBUG"
log_dir: "./logs"
log_to_console: true
Expand Down
3 changes: 2 additions & 1 deletion demo/config/ipc/parser_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
component_type: "parsers.template_matcher.MatcherParser"
component_config_class: "parsers.template_matcher.MatcherParserConfig"
component_name: "test-parser"
manager_addr: "ipc:///tmp/test_parser_cmd.ipc"
http_host: "127.0.0.1"
http_port: 8010
engine_addr: "ipc:///tmp/test_parser_engine.ipc"
output_engine_addr: "ipc:///tmp/test_nvd_engine.ipc"
log_level: "DEBUG"
Expand Down
3 changes: 2 additions & 1 deletion demo/config/ipc/reader_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
component_type: "readers.log_file.LogFileReader"
component_config_class: "readers.log_file.LogFileConfig"
component_name: "test-reader"
manager_addr: "ipc:///tmp/test_reader_cmd.ipc"
http_host: "127.0.0.1"
http_port: 8000
engine_addr: "ipc:///tmp/test_reader_engine.ipc"
log_level: "DEBUG"
log_dir: "./logs"
Expand Down
3 changes: 2 additions & 1 deletion demo/config/parser_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
component_type: "parsers.template_matcher.MatcherParser"
component_config_class: "parsers.template_matcher.MatcherParserConfig"
component_name: "test-parser"
manager_addr: "tcp://parser:8010"
http_host: "127.0.0.1"
http_port: 8010
engine_addr: "tcp://parser:8011"
log_level: "DEBUG"
log_dir: "./logs"
Expand Down
3 changes: 2 additions & 1 deletion demo/config/reader_settings.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
component_type: "readers.log_file.LogFileReader"
component_config_class: "readers.log_file.LogFileConfig"
component_name: "test-reader"
manager_addr: "tcp://reader:8000"
http_host: "127.0.0.1"
http_port: 8000
engine_addr: "tcp://reader:8001"
log_level: "DEBUG"
log_dir: "./logs"
Expand Down
43 changes: 36 additions & 7 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ These settings control the service infrastructure.
| `log_dir` | `DETECTMATE_LOG_DIR` | `./logs` | Directory for log files. |
| `log_to_console` | `DETECTMATE_LOG_TO_CONSOLE` | `true` | Whether logs are written to stdout/stderr. |
| `log_to_file` | `DETECTMATE_LOG_TO_FILE` | `true` | Whether logs are written to files in `log_dir`. |
| `manager_addr` | `DETECTMATE_MANAGER_ADDR` | `ipc:///tmp/detectmate.cmd.ipc` | Address for management commands (REQ/REP). |
| `http_host` | `DETECTMATE_HTTP_HOST` | `127.0.0.1` | Host address for the HTTP server.
| `http_port` | `DETECTMATE_HTTP_PORT` | `8000` | Port for the HTTP server. |
| `manager_recv_timeout` | `DETECTMATE_MANAGER_RECV_TIMEOUT` | `100` | Receive timeout (ms) for the manager command channel. |
| `manager_thread_join_timeout` | `DETECTMATE_MANAGER_THREAD_JOIN_TIMEOUT` | `1.0` | Timeout (s) when waiting for the manager thread to stop. |
| `engine_addr` | `DETECTMATE_ENGINE_ADDR` | `ipc:///tmp/detectmate.engine.ipc` | Address for data processing (PAIR0/1). |
Expand All @@ -35,8 +36,9 @@ component_name: "my-detector"
log_level: "DEBUG"
log_dir: "./logs"

# Manager Interface (Command Channel)
manager_addr: "ipc:///tmp/detectmate.cmd.ipc"
# Manager Interface
http_host: 127.0.0.1
http_port: 8000

# Engine Interface (Data Channel)
engine_addr: "ipc:///tmp/detectmate.engine.ipc"
Expand Down Expand Up @@ -66,13 +68,40 @@ detectmate start

In addition to the service settings (which configure the *runner*), you can also pass a separate configuration file for the specific component logic (e.g., detector parameters) using the `--config` flag in the CLI. This file is specific to the implementation of the component you are running.

Component configuration controls the specific logic of the detector or parser. To support dynamic library loading, this file uses a nested structure.
The configuration must be namespaced by the component category (detectors or parsers) and the specific class name to allow the library to correctly route parameters.
Example detector_config.yaml


```yaml
# detector-config.yaml
threshold: 0.85
sensitivity: high
enabled: true
detectors: # Category Level
NewValueDetector: # Class Name Level
auto_config: false
method_type: new_value_detector
params: # Implementation Specific Level
log_variables:
- id: test
template: dummy_template
variables:
- name: var1
pos: 0
params:
threshold: 0.0
```

You can read more about Components in the [Using a Library Component](library.md) section.


## HTTP Admin Interface

The service provides a REST API for runtime management and monitoring.

### Core Endpoints

| Method | Endpoint | Description |
| :--- | :--- | :--- |
| `GET` | `/admin/status` | Returns the health, running state, and current effective configurations. |
| `POST` | `/admin/start` | Starts the data processing engine thread. |
| `POST` | `/admin/stop` | Stops the data processing engine thread. |
| `POST` | `/admin/reconfigure` | Updates component parameters dynamically. |
| `POST` | `/admin/shutdown` | Gracefully terminates the entire service process. |
Loading