Skip to content

Commit b03ebd9

Browse files
trend-willem-gooderhamtrenth-trendkjkr73-TRE
authored andcommitted
feat: Add Trend Micro Vision One AI Application Security community integration (#1355)
--------- Co-authored-by: Trent Holmes <[email protected]> Co-authored-by: Karanjot Singh Saggu <[email protected]>
1 parent fa9e9ee commit b03ebd9

File tree

15 files changed

+503
-0
lines changed

15 files changed

+503
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Trend Micro Vision One AI Application Security
2+
3+
Trend Micro Vision One [AI Application Security's](https://docs.trendmicro.com/en-us/documentation/article/trend-vision-one-ai-scanner-ai-guard) AI Guard feature uses a configurable policy to identify risks in AI Applications, such as:
4+
5+
- Prompt injection attacks
6+
- Toxicity, violent, and other harmful content
7+
- Sensitive Data
8+
9+
10+
## Setup
11+
12+
1. Create a new [Vision One API Key](https://docs.trendmicro.com/en-us/documentation/article/trend-vision-one-platform-api-keys) with permissions to Call Detection API
13+
2. See the [AI Guard Integration Guide](https://docs.trendmicro.com/en-us/documentation/article/trend-vision-one-platform-api-keys) for details around creating your policy
14+
15+
[Colang v1](../../../examples/configs/trend_micro/):
16+
17+
```yaml
18+
# config.yml
19+
20+
rails:
21+
config:
22+
trend_micro:
23+
v1_url: "https://api.xdr.trendmicro.com/beta/aiSecurity/guard" # Replace this with your AI Guard URL
24+
api_key_env_var: "V1_API_KEY"
25+
input:
26+
flows:
27+
- trend ai guard input
28+
29+
output:
30+
flows:
31+
- trend ai guard output
32+
```
33+
[Colang v2](../../../examples/configs/trend_micro_v2/):
34+
```yaml
35+
# config.yml
36+
colang_version: "2.x"
37+
rails:
38+
config:
39+
trend_micro:
40+
v1_url: "https://api.xdr.trendmicro.com/beta/aiSecurity/guard" # Replace this with your AI Guard URL
41+
api_key_env_var: "V1_API_KEY"
42+
```
43+
```
44+
# rails.co
45+
46+
import guardrails
47+
import nemoguardrails.library.trend_micro
48+
49+
flow input rails $input_text
50+
trend ai guard $input_text
51+
52+
flow output rails $output_text
53+
trend ai guard $output_text
54+
```

docs/user-guides/guardrails-library.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ NeMo Guardrails comes with a library of built-in guardrails that you can easily
2727
- [Fiddler Guardrails for Safety and Hallucination Detection](#fiddler-guardrails-for-safety-and-hallucination-detection)
2828
- [Prompt Security Protection](#prompt-security-protection)
2929
- [Pangea AI Guard](#pangea-ai-guard)
30+
- [Trend Micro Vision One AI Application Security](#trend-micro-vision-one-ai-application-security)
3031
- OpenAI Moderation API - *[COMING SOON]*
3132

3233
4. Other
@@ -915,6 +916,27 @@ rails:
915916

916917
For more details, check out the [Pangea AI Guard Integration](./community/pangea.md) page.
917918

919+
### Trend Micro Vision One AI Application Security
920+
921+
NeMo Guardrails supports using
922+
[Trend Micro Vision One AI Guard](https://docs.trendmicro.com/en-us/documentation/article/trend-vision-one-ai-scanner-ai-guard) for protecting input and output flows within AI-powered applications.
923+
924+
See [Trend Micro](community/trend-micro.md) for more details.
925+
926+
#### Example usage
927+
928+
```yaml
929+
rails:
930+
input:
931+
flows:
932+
- trend ai guard input
933+
output:
934+
flows:
935+
- trend ai guard output
936+
```
937+
938+
For more details, check out the [Trend Micro Vision One AI Application Security](./community/trend-micro.md) page.
939+
918940
## Other
919941

920942
### Jailbreak Detection

docs/user-guides/llm-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ If you want to use an LLM and you cannot see a prompt in the [prompts folder](ht
4141
| Fiddler Fast Faitfhulness Hallucination Detection _(LLM independent)_ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔
4242
| Fiddler Fast Safety & Jailbreak Detection _(LLM independent)_ ||||||||||||
4343
| Pangea AI Guard integration _(LLM independent)_ ||||||||||||
44+
| Trend Micro Vision One AI Application Security _(LLM independent)_ ||||||||||||
4445

4546
Table legend:
4647

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Trend Micro Vision One AI Application Security Example
2+
3+
This example demonstrates how to integrate with the Trend Micro Vision One AI Guard API for protecting data and interactions with LLMs within AI-powered applications
4+
5+
To test this configuration you can use the CLI Chat by running the following command from the `examples/configs/trend_micro` directory:
6+
7+
```bash
8+
poetry run nemoguardrails chat --config=.
9+
```
10+
11+
Documentation:
12+
13+
- [Configuration options and setup instructions](../../../docs/user-guides/community/trend-micro.md)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
enable_rails_exceptions: True
2+
3+
models:
4+
- type: main
5+
engine: openai
6+
model: gpt-4o-mini
7+
8+
instructions:
9+
- type: general
10+
content: |
11+
You are a helpful assistant.
12+
13+
rails:
14+
config:
15+
trend_micro:
16+
api_key_env_var: "V1_API_KEY"
17+
input:
18+
flows:
19+
- trend ai guard input
20+
output:
21+
flows:
22+
- trend ai guard output
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Trend Micro Vision One AI Application Security Example
2+
3+
This example demonstrates how to integrate with the Trend Micro Vision One API Guard API for protecting data and interactions with LLMs within AI-powered applications
4+
5+
To test this configuration you can use the CLI Chat by running the following command from the `examples/configs/trend_micro_v2` directory:
6+
7+
```bash
8+
poetry run nemoguardrails chat --config=.
9+
```
10+
11+
Documentation:
12+
13+
- [Configuration options and setup instructions](../../../docs/user-guides/community/trend-micro.md)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
colang_version: "2.x"
2+
3+
enable_rails_exceptions: True
4+
5+
rails:
6+
config:
7+
trend_micro:
8+
api_key_env_var: "V1_API_KEY"
9+
10+
models:
11+
- type: main
12+
engine: openai
13+
model: gpt-4o-mini
14+
15+
instructions:
16+
- type: general
17+
content: |
18+
You are a helpful assistant.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import core
2+
import llm
3+
4+
flow main
5+
activate llm continuation
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import guardrails
2+
import nemoguardrails.library.trend_micro
3+
4+
flow input rails $input_text
5+
trend ai guard input $input_text
6+
7+
flow output rails $output_text
8+
trend ai guard output $output_text
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.

0 commit comments

Comments
 (0)