Repository navigation
harden: add resource limit in client.py (gitlab.bandit.B113) - #743
Merged
mahesh-bespoke merged 1 commit intoOct 9, 2026
Merged
mahesh-bespoke merged 1 commit into
mahesh-bespoke merged 1 commit into
Conversation
Automated security fix generated by OrbisAI Security
EntelligenceAI PR SummaryAdded a 30-second timeout to the session-creation HTTP POST in Review Scorecard
Safe to merge with a low blast radius; code quality rated Excellent (5/5): the review found nothing to flag. Key Findings:
Evaluated against
|
WalkthroughThis update adds a 30-second timeout to session creation requests, preventing the client from blocking indefinitely when the session service is unresponsive while preserving existing response handling and session initialization behavior. ChangesFiles
Updated |
mahesh-bespoke
self-requested a review
October 9, 2026 01:42
mahesh-bespoke
approved these changes
Oct 9, 2026
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.
The application was found using the
requestsmodule without configuring a timeout value for connections. This could lead to uncontrolled resource consumption where the application could run out of socket descriptors, effectively causing a Denial of Service (DoS). To remediate this issue, pass in atimeout=argument to eachrequestscall. Example using a timeout for an HTTP GET request:# Issue a GET request to https://example.com with a timeout of 10 seconds response = requests.get('https://example.com', timeout=10) # Work with the response object # .... For more information on using the requests module see: - https://requests.readthedocs.io/en/latest/api/. This is defence-in-depth atsrc/bespokelabs/curator/client.py:72rather than a vulnerability I can show is exploitable here — it makes the failure mode explicit and bounded. Close it freely if the pattern is intentional.Reference: CWE-400
What changed
src/bespokelabs/curator/client.pyVerification
No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.
Automated security fix by OrbisAI Security