PANW AI Runtime Security API
Author: Matt Zhang
Version: 0.0.5
Type: tool
中文文档|Chinese Doc: https://github.com/zm1990s/PANW-AIRS-for-Dify/blob/main/README-CN.md
This plugin is a PANW AI Runtime Security API security tool designed for the Dify platform, aiming to enhance the security of AI model and interactions. By integrating Palo Alto Networks' advanced cloud threat detection services, it provides users with comprehensive security protection.
The software is provided "as is" and the author disclaims all warranties with regard to this software including all implied warranties of merchantability and fitness. in no event shall the author be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.
Authorized users should refer to the AI Runtime Security: API Intercept Overview to complete the configuration of AI Runtime Security.
If you have not yet been authorized, please contact our Palo Alto Networks account manager.
Install the plugin via Marketplace/Github/Local Plugin, and after installation, click "Authorize" to fill in the authentication information.
[Image blocked: img1]
You can call the plugin in Chatflow to retrieve input and output content separately. It is also necessary to use "conditional branches" for judgment. If the detection result includes "allow", the workflow continues; otherwise, static content is returned, the and workflow is stopped.
[Image blocked: img2]
The following is an example of calling the input side tool:
[Image blocked: img3]
The specific parameters are described as follows:
The input judgment component is configured as follows:
[Image blocked: img4]
The following is an example of calling the output side tool:
[Image blocked: img5]
The output judgment component is configured as follows:
[Image blocked: img6]
[Image blocked: img7]
Prompt examples:
You are a personal information inquiry chatbot.
You need to chat with users. Before chatting, you should call the tool to check the user's input. If the detection result includes "block", reply to the user with "Input is prohibited", otherwise answer the question normally.
If the user is asking about information related to Matt, you need to query the knowledge base for relevant content.
Before answering the question, you should call the tool to check the output. If the detection result includes "block", reply to the user with "Output is prohibited", otherwise answer the question normally.
[Image blocked: img8]
作者: Matt Zhang
版本: 0.0.5
类型: tool
本软件按“原样”提供,作者不承担与本软件相关的任何担保,包括所有关于适销性和适用性的默示担保。在任何情况下,作者均不对任何因使用、数据或利润损失而导致的特殊、直接、间接或后果性损害或任何损害承担责任,无论是因合同、疏忽或其他侵权行为而导致的,也无论该等损害是否因使用或执行本软件而产生或与之相关。
该插件是一款适用于 Dify 平台的 PANW AI Runtime Security API 安全工具,旨在增强 AI 模型和数据交互中的安全性,通过集成 Palo Alto Networks 先进的云威胁检测服务,为用户提供全方位的安全防护。
已获得授权的用户,请参照此文档完成 AI Runtime Security 的配置。
如还未获得授权,请联系 Palo Alto Networks 客户经理。
通过 Marketplace/Github/本地插件等方式安装插件,安装完毕后点击“去授权”,确保认证成功。
[Image blocked: img1]
可以在 Chatflow 中分别调用插件对输入和输出内容进行检索,同时需要搭配“条件分支”来进行判断,如果检测结果中包含 "allow" 则继续进行工作流,否则返回静态内容,停止工作流。
[Image blocked: img2]
输入侧工具调用示例如下:
[Image blocked: img3]具体参数说明如下:
输入判断组件配置如下:
[Image blocked: img4]输出侧工具调用示例如下:
[Image blocked: img5]输出判断组件配置如下:
[Image blocked: img6]提示词示例:
你是一个个人信息查询对话机器人。
你需要和用户聊天,在聊天前需要先调用 palo_alto_networks_ai_security_api 对用户的输入进行检查,如果检测结果中包含 block,则回复用户“输入已被禁止”,否则请正常回答问题。
如果用户在询问 Matt 相关的信息,需要查询知识库获取相关的内容。
在回答问题前,需要先将你想回答的内容调用 palo_alto_networks_ai_security_api 对输出进行检查,如果检测结果中包含 block,则回复用户“输出已被禁止”,否则请正常回答问题。