refactor(agent): split orchestration into config, healing, and main modules
This commit is contained in:
1 parent
5fc5b8c114
commit
480eea8095
7 files changed
+388
-335
No files matched your search
@@ -19,7 +19,7 @@ The standard `crowdsec-firewall-bouncer` can occasionally experience "ghost" des
|
||||
- **Metadata drift check:** Flags long-duration decisions that are near expiry in kernel state.
|
||||
- **Kernel scan scope:** Scans `ip crowdsec` and `ip6 crowdsec6` tables via `nft -j`.
|
||||
|
||||
### The Orchestrator (`agent.py`)
|
||||
### The Orchestrator (`main.py`)
|
||||
- Runs the reconcile loop (default `600s` interval).
|
||||
- Triggers heal when any drift is detected.
|
||||
- Applies flap suppression using drift fingerprint, not raw kernel count.
|
||||
@@ -33,7 +33,10 @@ The standard `crowdsec-firewall-bouncer` can occasionally experience "ghost" des
|
||||
## 📂 Project Structure
|
||||
```text
|
||||
threat-engine-agent/
|
||||
├── agent.py # Main loop and heal orchestration
|
||||
├── agent.py # Compatibility entrypoint used by systemd
|
||||
├── main.py # Main loop and orchestration
|
||||
├── config.py # Runtime settings + logging setup
|
||||
├── healing.py # Heal gating + post-heal verification
|
||||
├── auditor.py # LAPI vs nft reconciliation and drift fingerprinting
|
||||
├── reporter.py # Local state and heal history writer
|
||||
├── config.yaml # Runtime defaults (overridable by env)
|
||||
|
||||
Reference in new issue
Block a user