45 lines
1.3 KiB
Markdown
45 lines
1.3 KiB
Markdown
---
|
|
title: "[bojemoi] feat(ml-threat): add MSF real data training loop"
|
|
date: 2026-07-07T23:38:54+02:00
|
|
draft: false
|
|
tags: ["commit", "bojemoi", "main"]
|
|
categories: ["Git Activity"]
|
|
summary: "Commit 410ef77 par grafana-watcher dans bojemoi"
|
|
author: "grafana-watcher"
|
|
---
|
|
|
|
## Commit `410ef77`
|
|
|
|
| | |
|
|
|---|---|
|
|
| **Repository** | bojemoi |
|
|
| **Branch** | `main` |
|
|
| **Author** | grafana-watcher |
|
|
| **Hash** | `410ef77a7e084d0b7dc07c0431eb82a4fbe1b746` |
|
|
|
|
|
|
### Description
|
|
|
|
- New train_from_msf.py: fetches 50k hosts from MSF postgres DB (hosts+services+vulns JOIN), builds 10-feature matrix with country_risk=70 fixed, labels 0/1/2 by thresholds, mixes 20% synthetic, trains IOCClassifier + ReputationScorer
|
|
- api.py: async retrain loop (24h interval), POST /models/retrain endpoint (409 if locked), /models/reload now returns last_retrain timestamp
|
|
- stack/45: add MSF_DB_* env vars + RETRAIN_INTERVAL_HOURS
|
|
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
### Files Changed
|
|
|
|
```
|
|
M ml-threat/api.py
|
|
A ml-threat/train_from_msf.py
|
|
M stack/45-service-ml-threat-intel.yml
|
|
```
|
|
|
|
### Diff Summary
|
|
|
|
```
|
|
ml-threat/api.py | 107 +++++++++++++++-
|
|
ml-threat/train_from_msf.py | 232 +++++++++++++++++++++++++++++++++++
|
|
stack/45-service-ml-threat-intel.yml | 5 +
|
|
3 files changed, 338 insertions(+), 6 deletions(-)
|
|
```
|