Metadata-Version: 2.4
Name: klyrek-monitor
Version: 0.1.0
Summary: Continuous monitoring of authorized targets for the Klyrek ecosystem
Author: Klyrek Contributors
License: MIT
Keywords: appsec,monitoring,pentesting,reconnaissance,security
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.10
Requires-Dist: klyrek-core
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# klyrek-monitor

Continuous monitoring of authorized targets, built on periodic re-scans rather than a
scheduler daemon — Klyrek doesn't ship a task queue, so "continuous" here means "run
`klyrek crawl` again later (via your own cron/CI schedule) and diff the result against the
last one."

- **`snapshot`** — `save_snapshot(result, path)` / `load_snapshot(path)` round-trip a full
  `ScanResult` to/from JSON on disk, so a scan from last week can be compared against today's.
- **`diff`** — `compute_diff(old, new)` compares two scans of the same target: new/removed
  endpoints, new/removed/version-changed technologies, and new/resolved findings.
- **`report`** — `render_diff_markdown(diff)` turns a `ScanDiff` into a readable change
  summary (or a one-line "no changes" message).

```python
from pathlib import Path

from klyrek_monitor.diff import compute_diff
from klyrek_monitor.report import render_diff_markdown
from klyrek_monitor.snapshot import load_snapshot, save_snapshot

previous = load_snapshot(Path("last_scan.json"))
diff = compute_diff(previous, current_result)
print(render_diff_markdown(diff))
save_snapshot(current_result, Path("last_scan.json"))
```
