AdaCore / AdaCore/e3-core

Uncaught exception in e3.cve.NVD.search_by_cpe_name()

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

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
32
Forks
36
PR merge metrics
No merged PRs in 30d

Description

When the number of queries to NVD has reached its limit, the search_by_cpe_name() method crashes on r.json().
The request status should be checked.
As the number of requests to NVD is limited, it would be good to either implement a retry, either keep in mind the startpage, so that, on failure, the next call does not exhaust the number of API calls.

Contributor guide

Open the contributing guide

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 at e3.cve.NVD.search_by_cpe_name() and trace how the NVD response is handled when its query limit is reached. Confirm the failure case without assuming a retry or pagination strategy; done means a limited or non-JSON response no longer causes an uncaught r.json() exception, with the chosen recovery behavior covered by tests if existing test locations are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.