Skip to content

Commit 6155e38

Browse files
trend-willem-gooderhamtrenth-trendkjkr73-TRE
committed
feat: Add Trend Micro AI Guard community integration
Co-authored-by: Trent Holmes <[email protected]> Co-authored-by: Karanjot Singh Saggu <[email protected]>
1 parent 92fe37c commit 6155e38

File tree

14 files changed

+360
-0
lines changed

14 files changed

+360
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
The following environment variable is required to use the integration:
11+
12+
- `V1_API_KEY`: A Vision One API Token with AI Guard Permissions
13+
14+
You can optionally set:
15+
16+
- `V1_URL`: The URL for which instances of AI Guard should be invoked
17+
Defaults to `https://api.xdr.trendmicro.com/beta/aiSecurity/guard` for Vision One's hosted US SaaS deployment
18+
19+
## Setup
20+
21+
[Colang v1](../../../examples/configs/trend_micro/):
22+
23+
```yaml
24+
# config.yml
25+
26+
rails:
27+
input:
28+
flows:
29+
- trend ai guard input
30+
31+
output:
32+
flows:
33+
- trend ai guard output
34+
```
35+
[Colang v2](../../../examples/configs/trend_micro_v2/):
36+
```yaml
37+
# config.yml
38+
colang_version: "2.x"
39+
```
40+
```
41+
# rails.co
42+
43+
import guardrails
44+
import nemoguardrails.library.trend_micro
45+
46+
flow input rails $input_text
47+
trend ai guard $input_text
48+
49+
flow output rails $output_text
50+
trend ai guard $output_text
51+
```

docs/user-guides/guardrails-library.md

Lines changed: 19 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,24 @@ 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 Trend Micro Vision One AI Guard for protecting input and output flows within AI-powered applications.
922+
923+
#### Example usage
924+
925+
```yaml
926+
rails:
927+
input:
928+
flows:
929+
- trend ai guard input
930+
output:
931+
flows:
932+
- trend ai guard output
933+
```
934+
935+
For more details, check out the [Trend Micro Vision One AI Application Security](./community/trend-micro.md) page.
936+
918937
## Other
919938

920939
### 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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
input:
15+
flows:
16+
- trend ai guard input
17+
output:
18+
flows:
19+
- 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
colang_version: "2.x"
2+
3+
enable_rails_exceptions: True
4+
5+
models:
6+
- type: main
7+
engine: openai
8+
model: gpt-4o-mini
9+
10+
instructions:
11+
- type: general
12+
content: |
13+
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_text
6+
7+
flow output rails $output_text
8+
trend ai guard $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)