github-advanced-security[bot] commented on code in PR #269: URL: https://github.com/apache/incubator-hugegraph-ai/pull/269#discussion_r2249907250
########## hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py: ########## @@ -64,14 +64,25 @@ return 200 -def test_api_connection(url, method="GET", headers=None, params=None, body=None, auth=None, origin_call=None) -> int: +def test_api_connection( + url, method="GET", headers=None, params=None, body=None, auth=None, origin_call=None +) -> int: # TODO: use fastapi.request / starlette instead? log.debug("Request URL: %s", url) try: if method.upper() == "GET": - resp = requests.get(url, headers=headers, params=params, timeout=(1.0, 5.0), auth=auth) + resp = requests.get( + url, headers=headers, params=params, timeout=(1.0, 5.0), auth=auth + ) elif method.upper() == "POST": - resp = requests.post(url, headers=headers, params=params, json=body, timeout=(1.0, 5.0), auth=auth) + resp = requests.post( + url, + headers=headers, + params=params, + json=body, + timeout=(1.0, 5.0), + auth=auth, + ) Review Comment: ## Full server-side request forgery The full URL of this request depends on a [user-provided value](1). The full URL of this request depends on a [user-provided value](2). The full URL of this request depends on a [user-provided value](3). [Show more details](https://github.com/apache/incubator-hugegraph-ai/security/code-scanning/31) ########## hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py: ########## @@ -64,14 +64,25 @@ return 200 -def test_api_connection(url, method="GET", headers=None, params=None, body=None, auth=None, origin_call=None) -> int: +def test_api_connection( + url, method="GET", headers=None, params=None, body=None, auth=None, origin_call=None +) -> int: # TODO: use fastapi.request / starlette instead? log.debug("Request URL: %s", url) try: if method.upper() == "GET": - resp = requests.get(url, headers=headers, params=params, timeout=(1.0, 5.0), auth=auth) + resp = requests.get( + url, headers=headers, params=params, timeout=(1.0, 5.0), auth=auth + ) Review Comment: ## Full server-side request forgery The full URL of this request depends on a [user-provided value](1). The full URL of this request depends on a [user-provided value](2). The full URL of this request depends on a [user-provided value](3). [Show more details](https://github.com/apache/incubator-hugegraph-ai/security/code-scanning/30) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@hugegraph.apache.org For additional commands, e-mail: issues-h...@hugegraph.apache.org