Prevent silent API drift against MISP core
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Read pymisp/api.py around fetch_all_feeds() and compare its HTTP method with the upstream MISP endpoint change described in the issue. Then review tests/test_api.py and the existing CI workflow to assess the proposed contract checks and offline coverage. Done means PyMISP has a maintainable automated guard that catches API method or path drift; the issue leaves the choice of safeguard open.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
PyMISP.fetch_all_feeds() (feeds/fetchFromAllFeeds) remained on GET after MISP/MISP commit 50106c9a01 (2026-08-25, shipped in MISP v2.5.46 on 2026-09-10) restricted fetchFromFeed, fetchFromAllFeeds, cacheFeeds, enable, and disable to POST via $this->request->allowMethod(['post']).
How this drift occurred:
- I added
fetch_all_feeds()to PyMISP on2026-07-24(PR #1460,0097c78) usingGET, matching the adjacent feed methods at the time. - On
2026-09-02, commitd91f77f(chg: [http method] changed for multiple endpoints) updatedfetch_feed,cache_*_feeds,server_pull, andserver_pushtoPOST, but accidentally skippedfetch_all_feedsright betweenfetch_feedandcache_all_feeds. - In
tests/testlive_comprehensive.py(test_feeds),fetch_all_feeds()(andfetch_feed()) are commented out to avoid pulling full external OSINT feeds during live CI runs, and there were no offline unit tests asserting HTTP methods for feed endpoints. Consequently, the HTTP405 Method Not Allowederror went undetected in CI.
Why this is a reliability problem
PyMISP is the primary programmatic interface for MISP automation—used in cron jobs, SOAR integrations, and threat-intelligence ingestion pipelines.
- Broken methods ship undetected: Any endpoint in
pymisp/api.pythat cannot be safely exercised intestlive_comprehensive.py(destructive operations, heavy bulk fetches, sync triggers) currently has no automated guard against upstream MISP changes. - Unpredictable compatibility across MISP versions: Users upgrading MISP (e.g. to
2.5.46+) experience sudden failures in official PyMISP methods even when running the latest PyMISP release. - High maintenance burden: Auditing
pymisp/api.pymanually againstMISP/MISPcommits after each MISP release is error-prone and unsustainable as both codebases evolve (including MISP 2.5 and 3.0).
Proposed long-term directions
Rather than only fixing individual drifted endpoints reactively, PyMISP would benefit from structural safeguards:
- Automated API contract check in CI: Validate the
(HTTP method, endpoint path)pairs used inpymisp/api.pyagainst MISP's OpenAPI specification (or a controller-derived manifest generated byMISP/MISP) so any mismatch fails CI automatically. - Offline unit test coverage for non-live-testable endpoints: Expand
tests/test_api.pyto assert HTTP verbs, URL paths, and payload shapes for endpoints that are intentionally skipped or commented out intests/testlive_comprehensive.py(such asfetch_all_feeds,fetch_feed, sync triggers, and destructive admin actions). - Scheduled drift check against MISP
develop/ latest release: Run a periodic workflow comparing PyMISP's implemented endpoints against upstream MISP so breaking changes are caught before a MISP release ships rather than months afterward.
Related MISP issue: MISP/MISP#11325
- Lingua principale
- Python
- Stelle
- 496
- Fork
- 292
- Merge medio
- 2g 23h
- PR unite (30g)
- 2
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 MISP/PyMISP
-
Cannot update `first_seen` or `last_seen` when its nullForse di nuovo libera @Rafiot l’ha presa 123 giorni fa e non c’è nessuna pull request aperta. Aperta
MISP/PyMISP#1463 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
MISP/PyMISP#1406 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Feature Request: Ability to create new warning_lists and add new values to existing one via the APIApertaT: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 2 giorni
-
S: needs change in MISP T: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
MISP/PyMISP#1347 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Feature Request: MISP task controlForse di nuovo libera @Rafiot l’ha presa 466 giorni fa e non c’è nessuna pull request aperta. Aperta
MISP/PyMISP#1345 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
Bforartists/Manual#1916 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
JdeRobot/PerceptionMetrics#698 ·
I maintainer di solito rispondono entro 6 giorni
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
rootsiemen/seo-agent-tools#70 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
stephrobert/dsoxlab#413 ·
I maintainer di solito rispondono entro 1 giorno
-
format:line_indent keeps the second of two consecutive blank lines, so valid stairs failForse già presa @albertlieyingadrian l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100