mitre / mitre/multiscanner

Reconsider how reports are stored in REST API in non-distributed mode

Open
#150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
621
Forks
128
PR merge metrics
No merged PRs in 30d

Description

As you can see here, the REST API updates the task database before even attempting to store the report in ES. So if any exceptions get raised from the elasticsearch storage handler, it'll still get marked as Complete.

The REST API also has the same thread-related problem as the celery worker in #149.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in utils/api.py at lines 245-252, then read issue #149 for the related thread problem and inspect the Elasticsearch storage handler. Done means the task is not marked Complete when report storage raises an exception, and the REST API's thread-related problem is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.