65 lines
2.2 KiB
Markdown
65 lines
2.2 KiB
Markdown
---
|
|
title: "[bojemoi] refactor(samsonov): migrate pentest_orchestrator and nuclei_api to bojemoi-sdk"
|
|
date: 2026-07-02T19:41:51+02:00
|
|
draft: false
|
|
tags: ["commit", "bojemoi", "main"]
|
|
categories: ["Git Activity"]
|
|
summary: "Commit 3a198fe par grafana-watcher dans bojemoi"
|
|
author: "grafana-watcher"
|
|
---
|
|
|
|
## Commit `3a198fe`
|
|
|
|
| | |
|
|
|---|---|
|
|
| **Repository** | bojemoi |
|
|
| **Branch** | `main` |
|
|
| **Author** | grafana-watcher |
|
|
| **Hash** | `3a198fe11240f86d21bc0727228bd52f55772671` |
|
|
|
|
|
|
### Description
|
|
|
|
pentest_orchestrator/main.py:
|
|
- Remove ~220 lines of boilerplate (_read_secret, get_db, pick_next_host,
|
|
_dojo_api, _dojo_get_or_create*, aggregate_and_push_dojo, send_telegram*,
|
|
pending_campaigns, set_campaign_phase, update_campaign_post_flags,
|
|
mark_campaign_dojo_ok, query_target_profile)
|
|
- Import from bojemoi.{secrets,database,defectdojo,telegram} + bojemoi.pentest.*
|
|
- dojo_worker_loop: use DojoClient._post() instead of inline requests calls
|
|
- Dockerfile: build from repo root, install sdk/ before service deps
|
|
|
|
nuclei_api/main.py:
|
|
- Remove _read_secret, inline defectdojo hierarchy (~100 lines)
|
|
- Replace with DojoClient.get_or_create_{product,engagement,test}
|
|
- Switch from redis to valkey.Valkey (already a dep via SDK)
|
|
- Dockerfile: build from repo root, install sdk/ before requirements.txt
|
|
- requirements.txt: drop requests, redis (now in SDK)
|
|
|
|
Build commands:
|
|
docker build --no-cache -f samsonov/pentest_orchestrator/Dockerfile -t localhost:5000/pentest-orchestrator:latest .
|
|
docker build --no-cache -f samsonov/nuclei_api/Dockerfile -t localhost:5000/nuclei-api:latest .
|
|
|
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
### Files Changed
|
|
|
|
```
|
|
M samsonov/nuclei_api/Dockerfile
|
|
M samsonov/nuclei_api/main.py
|
|
M samsonov/nuclei_api/requirements.txt
|
|
M samsonov/pentest_orchestrator/Dockerfile
|
|
M samsonov/pentest_orchestrator/main.py
|
|
```
|
|
|
|
### Diff Summary
|
|
|
|
```
|
|
samsonov/nuclei_api/Dockerfile | 8 +-
|
|
samsonov/nuclei_api/main.py | 163 +++-----------
|
|
samsonov/nuclei_api/requirements.txt | 2 -
|
|
samsonov/pentest_orchestrator/Dockerfile | 8 +-
|
|
samsonov/pentest_orchestrator/main.py | 366 +++----------------------------
|
|
5 files changed, 74 insertions(+), 473 deletions(-)
|
|
```
|