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

fix added warning IP list too large #30217

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Packs/qualys/Integrations/Qualysv2/Qualysv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,7 @@
"use_ip_nt_range_tags_include", "use_ip_nt_range_tags_exclude",
"active",
"scanners_in_network",
"fqdn",
Copy link
Contributor

@MosheEichler MosheEichler Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it because Qualysv2 lacked the parameter fqdn
If not added, Demisto returns an error:

scan_create_no_fqdn

"recurrence",
"end_after_mins",
"iscanner_id",
Expand Down Expand Up @@ -1488,7 +1489,10 @@

@staticmethod
def error_handler(res):
err_msg = f"Error in API call [{res.status_code}] - {res.reason}"
err_msg = ""
if res.status_code == 414 or res.status_code == 520:
Copy link
Contributor

@MosheEichler MosheEichler Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you plesae add a reference (API documentetion) for this error (with status codes)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an error when we provide to the ip field an string of approximately between 5000 and 12000 characters containing IP, we receive a 414 error from the API, when we provide more than approximately 12000 characters containing IPs, we receive a 520 error,

We do not know if it is an error related to the Demisto processing of large characters in the URL

image

image

err_msg += "If this error was produced by a schedule-scan-create, please execute it again with IP list of less than 5000 characters\n\n"

Check failure on line 1494 in Packs/qualys/Integrations/Qualysv2/Qualysv2.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (E501)

Packs/qualys/Integrations/Qualysv2/Qualysv2.py:1494:131: E501 Line too long (148 > 130 characters)
err_msg += f"Error in API call [{res.status_code}] - {res.reason}"
try:
simple_response = get_simple_response_from_raw(parse_raw_response(res.text))
err_msg = f'{err_msg}\nError Code: {simple_response.get("CODE")}\nError Message: {simple_response.get("TEXT")}'
Expand Down
Loading