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

[ BUG ] falconpy don't handle wrong http header #1209

Open
kalidor opened this issue Jul 26, 2024 · 4 comments
Open

[ BUG ] falconpy don't handle wrong http header #1209

kalidor opened this issue Jul 26, 2024 · 4 comments
Assignees
Labels
bug 🐛 Something isn't working investigating This issue is being investigated spotlight Spotlight issues and questions

Comments

@kalidor
Copy link

kalidor commented Jul 26, 2024

Describe the bug
Using getVulnerabilities, with command (aka: Uber Class API command method), the code requests /spotlight/entities/vulnerabilities/v2?ids=<some_uuid>&ids=<some_uuid>. And i got sometimes the below response :

(empty line here)
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 26 Jul 2024 12:23:47 GMT
Content-Type: application/json
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Cs-Region: eu-1
X-Cs-Traceid: d3f778c2-5e4a-4dca-a7ed-b91a3217693a
X-Ratelimit-Limit: 6000
X-Ratelimit-Remaining: 5927
Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Length: 202345

{
 "meta": {
  "query_time": 0.33359162,
  "powered_by": "spapi",
  "trace_id": "..."

Yes the first line is actually empty (i can see that in Burp proxy). And the code crash, it's like falcon handle this as error 500.

image

To Reproduce
unfortunately, not reproducible all the time, but i got this several times

Expected behavior
Falcon should handle this or retry the request.
My current workaround is to wait a small amount of time and perform the exact same request.

Environment (please complete the following information):

  • OS: ubuntu 22.04
  • Python: 3.12
  • FalconPy: 3.1.3 [EDIT] 1.4.3 [/EDIT]

Additional context
my point is to retrieve all vulnerabilities by device. I got > 38K devices. just to see the amount of ids i provided to each call, I limit it to 50 by the way.

@kalidor kalidor added the bug 🐛 Something isn't working label Jul 26, 2024
@jshcodes
Copy link
Member

jshcodes commented Jul 29, 2024

Hi @kalidor -

To confirm, you are using FalconPy v1.3.3?

Can we see an example of the crash your describing (any error messages / tracebacks)?

Thank you for the report! 😄

@jshcodes jshcodes added the spotlight Spotlight issues and questions label Jul 29, 2024
@kalidor
Copy link
Author

kalidor commented Jul 29, 2024

falconpy: 1.4.3 sorry, read the wrong line....
Currently no, but i can try to get one.

@kalidor
Copy link
Author

kalidor commented Jul 29, 2024

Ok got it. I said code crash, but no got error 500 as the data below shows:

{
  "status_code": 500,
  "headers": {},
  "body":
  {
    "errors": [
      {
        "message": "('Connection aborted.', BadStatusLine('\\n'))",
        "code": 500
      }
  ],
  "resources": []
  }
}

@jshcodes
Copy link
Member

Ok got it. I said code crash, but no got error 500 as the data below shows:

{
  "status_code": 500,
  "headers": {},
  "body":
  {
    "errors": [
      {
        "message": "('Connection aborted.', BadStatusLine('\\n'))",
        "code": 500
      }
  ],
  "resources": []
  }
}

I think this gives us enough to try and mock up the scenario. We're investigating this.

@jshcodes jshcodes added the investigating This issue is being investigated label Jul 29, 2024
@jshcodes jshcodes self-assigned this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working investigating This issue is being investigated spotlight Spotlight issues and questions
Projects
None yet
Development

No branches or pull requests

2 participants