fix: gate SSL verification bypass on env flag in search_service.py - #97
Open
isla-brooks wants to merge 1 commit into
Open
fix: gate SSL verification bypass on env flag in search_service.py#97isla-brooks wants to merge 1 commit into
isla-brooks wants to merge 1 commit into
Conversation
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.
Hi there! First time contributing here, so please let me know if I missed anything.
I noticed that
backend/app/services/search_service.pysilently downgrades SSL certificate verification for ArXiv and DBLP searches when the system lacks proper CA certificates. This is a security concern because it enables man-in-the-middle attacks without giving the operator any control over the behavior.The issue:
FAROS_ALLOW_INSECURE_ARXIV_SSLenv var, but defaults toTrue(insecure by default)What I changed:
FAROS_ALLOW_INSECURE_SSL(unified name for both services) and changed the default fromTruetoFalseFAROS_ALLOW_INSECURE_SSLgating to the DBLP fallbackinfotowarningto make it more visibleBehavior after this PR:
FAROS_ALLOW_INSECURE_SSL=true: Logs a warning and retries with unverified context (useful for dev environments with broken CA bundles)Testing: Verified the diff manually. The
_env_boolhelper already exists and handles the parsing correctly. The change is backwards compatible in the sense that operators who need the insecure fallback can opt in via the env var.