You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org> on 2025/08/03 09:54:04 UTC
Re: [PR] feat(llm): Support switching prompt EN/CN. [incubator-hugegraph-ai]
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-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org