-
Notifications
You must be signed in to change notification settings - Fork 17.9k
Docs: Add SAP HANA Cloud Knowledge graph engine documentation #31392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Is there any form of query sanization? This looks like it's allowing for arbitrary queries against the database? |
It only allows queries against the knowledge graph as the query function calls a stored procedure on our plugin side. |
Is there a need to sanitize the query? Can a malicious actor inject sql? |
Your concerns are right in a way, it would be possible to pass malicious sparql here in theory. But since you need a dedicated HANA connection to open your |
The risk profile is developers use langchain-hana package to develop an application and expose some functionality (e.g., question answering) via an endpoint. Most developers will not expect that the Q&A chain can execute privileged commands. Is an attack possible through this code path: # Create a SPARQL QA Chain
chain = HanaSparqlQAChain.from_llm(
llm=llm,
verbose=True,
allow_dangerous_requests=True,
graph=graph,
)
output = chain.invoke("which actors acted in Blade Runner?")
print(output["result"]) For example, could a malicious user trick the underlying LLM to drop the database? If so, this is not a safe implementation since it's:
|
Description:
Adds a documentation with examples for the usage of
langchain
withlangchain-hana
and the SAP HANA Cloud Knowledge graph engine.Issue:
None - integration documentation
Dependencies:
None