Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend cannot process request when too many candidates are provided #326

Closed
copernico opened this issue Oct 8, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working component/prospector

Comments

@copernico
Copy link
Contributor

I tried to run the following:

python client/cli/main.py CVE-2021-30468 --use-nvd --repository https://github.com/apache/cxf --report html --max-candidates=3000

which produces 2346 candidates. The resulting request to the backend is a very long URL, that the backend cannot process correctly. The backend logs look like this:

INFO:     172.20.0.1:60878 - "GET /nvd/vulnerabilities/CVE-2021-30468 HTTP/1.1" 404 Not Found
WARNING:  Invalid HTTP request received.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
    event = self.conn.next_event()
  File "/usr/local/lib/python3.8/site-packages/h11/_connection.py", line 476, in next_event
    raise RemoteProtocolError(
h11._util.RemoteProtocolError: Receive buffer too long
@copernico copernico added bug Something isn't working component/prospector labels Oct 8, 2022
@sacca97
Copy link
Collaborator

sacca97 commented Oct 8, 2022

I think we need to find a reasonable threesold and split into multiple requests.
I noticed the same problem also with the 869 commits of:

CVE-2021-29425 --repository https://github.com/apache/commons-io

Alternatively there's an option to increase the buffer size according to our needs:

encode/uvicorn#1514

copernico pushed a commit that referenced this issue Nov 3, 2022
- Implemented twin commits, closes #147 
- Using basemodel again (pydantic)
- Fixed the logger, improved log aesthetics and readability
- github and jira issues are collected using their respective APIs (GITHUB token required via .env file)
- Better word extraction and filtering based on tests conducted on the small dataset.
- Report handlers now create nested folders
- updated to python 3.10
- skip GitHub when fetching references
- refactored git and raw_commit modules: all commit IDs, timestamp, parent, message and changed files are
collected with a single call to git executable
- refactored logging

- Fixes:
#339  
#341  
#334  
#331  
#326 
#336
@sacca97
Copy link
Collaborator

sacca97 commented Nov 4, 2022

Fixed with #342

@sacca97 sacca97 closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component/prospector
Projects
None yet
Development

No branches or pull requests

2 participants