Add timeout to requests.get call#70
Draft
deshibel wants to merge 1 commit into
Draft
Conversation
Co-authored-by: deshibel <68776367+deshibel@users.noreply.github.com>
|
I can only run on private repositories. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code Security (SAST) • View in Code Security (SAST)
This PR addresses a security vulnerability in the
get_product_from_apifunction where therequests.getcall was missing a timeout parameter. Without a timeout, the request could hang indefinitely if the server is unresponsive, leading to potential denial-of-service risks.Changes made:
timeout=5to therequests.getcall to ensure requests fail fast if the server does not respond within 5 seconds.This aligns with security best practices by preventing indefinite blocking of HTTP requests.
PR by Bits - View session in Datadog
Comment @DataDog to request changes