github-advanced-security[bot] commented on code in PR #73:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/73#discussion_r1728662515


##########
hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py:
##########
@@ -158,15 +174,20 @@
         raise gr.Error(str(e))
 
 
-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=5, auth=auth)
+            resp = requests.get(
+                url, headers=headers, params=params, timeout=5, 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).
   The full URL of this request depends on a [user-provided value](4).
   The full URL of this request depends on a [user-provided value](5).
   The full URL of this request depends on a [user-provided value](6).
   
   [Show more 
details](https://github.com/apache/incubator-hugegraph-ai/security/code-scanning/19)



##########
hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py:
##########
@@ -158,15 +174,20 @@
         raise gr.Error(str(e))
 
 
-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=5, auth=auth)
+            resp = requests.get(
+                url, headers=headers, params=params, timeout=5, auth=auth
+            )
         elif method.upper() == "POST":
-            resp = requests.post(url, headers=headers, params=params, 
json=body, timeout=5, auth=auth)
+            resp = requests.post(
+                url, headers=headers, params=params, json=body, timeout=5, 
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).
   The full URL of this request depends on a [user-provided value](4).
   The full URL of this request depends on a [user-provided value](5).
   The full URL of this request depends on a [user-provided value](6).
   
   [Show more 
details](https://github.com/apache/incubator-hugegraph-ai/security/code-scanning/20)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to