SUBTASK #44: Close scan session (2.2.1.4)
I maintainer di solito rispondono entro 1 giorno
@PavlockBlaine03 ci sta già lavorando.
Dal 27/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
What to do
The last step of every scan: record when it ended, how it ended (its outcome) and any errors, and mark the session as no longer running so the next scan can start. Also closes "stale" scans left marked as running after the server stopped mid-scan, which Open Scan Session (subtask 1) calls before opening a new one.
Background
- Spec: FR-13 (scan status and errors), OUT-06 (errors such as an empty ARP cache or an unreachable subnet), CM-15, SEC-14
- System design 2.2.1.4: "Record end time, outcome, and errors." Section 8.4: the Scan Manager decides the outcome; this module only records it.
- OOD:
Scan.complete()/Scan.fail(message); scan sequence step 11 ScanOutcomeinbackend/records/enums.py:success,partial,failed- Rules are in #44.
Steps
- Add
close(scan_id, outcome, errors)toScanSessionController(from subtask 1):- Sets
status = completed,ended_at = now,outcome, anderror_message(the errors, one per line; empty when there are none) - Saves through 3.1 (#15)
- Clears "the scan running in this process", so the next
open()is allowed - Clears that state even if saving fails (for example, the database is down): otherwise one failed save would block every future scan until the server restarts. The save error is still raised to the caller.
- Closing a scan that is already closed changes nothing
- Sets
- The outcome is passed in, not worked out here. Deciding between success, partial and failed is the Scan Manager's job (subtask 4); this module just records it (design 8.4).
- Optional:
Scan.finish(outcome, errors, ended_at)on the entity inbackend/records/scan.py, matching the OOD'scomplete()/fail(), so the rule "a finished scan has an end time and an outcome" lives with the scan -
close_stale_scans(): every scan stillrunningin the database except the one this process is running is closed asfailedwith "the server stopped during this scan". Called byopen()(subtask 1). - Long error lists are cut to a sensible length (for example, the first 50 lines plus "and N more") so one bad scan can't store megabytes of text
- Not audited separately, like the rest of the scan history (design open item 6)
- Unit tests with fakes:
- Close records the end time, outcome and errors, and the next
open()succeeds - Closing twice changes nothing
- A save that fails still clears the running state (and raises the error)
- A stale
runningrow is closed asfailed; the scan this process is running is left alone - A very long error list is shortened
- Close records the end time, outcome and errors, and the next
Where
backend/services/scan/scan_session.py (the same class as subtask 1)
Done when
- All unit tests pass without a database
- Against the test database, an opened scan closed as
partialshows its end time, outcome and error message, and a new scan can then be opened
Depends on
- Subtask 1, Open Scan Session (#45): same class
- #15 Network Data (3.1: updating the scan)
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 9h 31m
- PR unite (30g)
- 36
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Bearkat-Professionals/Software-Engineering-Project
-
SUBTASK #86: Password hashing (BB-5)Forse già presa @Edgeless6 l’ha presa 2 giorni fa. Apertabackend Low Priority subtask
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Bearkat-Professionals/Software-Engineering-Project#87 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Enhancement: Regression tests for Validate Input crash fixes (SH-1)Forse già presa @yoshi301 l’ha presa 1 giorno fa. Apertabackend Low Priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Bearkat-Professionals/Software-Engineering-Project#59 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Manage user accounts (admin)Forse già presa @Edgeless6 l’ha presa 2 giorni fa. Apertabackend Low Priority subtask
Difficoltà 4/5 Più di una settimana Idoneità per principianti 20/100
Bearkat-Professionals/Software-Engineering-Project#92 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Login screen and signed-in layoutForse già presa @Solo-Her0 l’ha presa 2 giorni fa. Apertafrontend Low Priority subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
Bearkat-Professionals/Software-Engineering-Project#91 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Sessions and route protection in the Application Controller (2.0)Forse già presa @javi120467 l’ha presa 2 giorni fa. Apertabackend Low Priority security subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
Bearkat-Professionals/Software-Engineering-Project#90 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Bearkat-Professionals/Software-Engineering-Project
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
area:docs documentation effort:M ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
mczielinski/ob-analytics#423 ·
I maintainer di solito rispondono entro 1 giorno
-
infra
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
vllm-project/vllm-ascend#21033 ·
I maintainer di solito rispondono entro 1 giorno