-
Notifications
You must be signed in to change notification settings - Fork 862
[New Plugin] Trend AI Guard #1453
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: main
Are you sure you want to change the base?
[New Plugin] Trend AI Guard #1453
Conversation
456a023 to
d4cf909
Compare
|
Hello @VisargD, I have reached out to the Portkey Team via discord and I was told that I could ping you on this PR to help move it forward. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new Trend AI Guard plugin that integrates Trend Micro's AI Application Security guardrail feature to scan LLM inputs and outputs for security threats and policy violations.
Key Changes:
- New plugin implementation for Trend AI Guard with support for beforeRequestHook and afterRequestHook events
- Comprehensive test coverage validating parameter requirements, API interactions, and threat detection logic
- Plugin registration and configuration
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/trend-ai/version.ts | Defines the plugin version as v1.0.0 |
| plugins/trend-ai/trendai.test.ts | Adds comprehensive unit tests covering validation, API integration, and threat detection scenarios |
| plugins/trend-ai/manifest.json | Configures plugin metadata, credentials schema, and function parameters |
| plugins/trend-ai/guard.ts | Implements the core guardrail handler with API integration and threat detection logic |
| plugins/index.ts | Registers the new trend-ai plugin in the plugin registry |
| conf.json | Adds trend-ai to the list of enabled plugins |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "description": "Trend AI Guard URL (e.g., https://api.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails)" | ||
| } | ||
| }, | ||
| "required": ["v1Url", "apiKey"] |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The required field references 'apiKey', but the credentials schema defines 'v1ApiKey'. These names should match for proper validation.
| "required": ["v1Url", "apiKey"] | |
| "required": ["v1Url", "v1ApiKey"] |
| }, | ||
| "required": ["applicationName"] | ||
| } |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'required' array is incorrectly nested inside the 'parameters' object. It should be placed at the same level as 'parameters', not inside it, to properly indicate which parameters are required for the function.
| }, | |
| "required": ["applicationName"] | |
| } | |
| } | |
| }, | |
| "required": ["applicationName"] |
| scan: f5GuardrailsScan, | ||
| }, | ||
| 'trend-ai': { | ||
| guard: trendAiGuard, |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name 'guard' doesn't match the function ID 'aiGuard' defined in the manifest. For consistency, these should match.
| guard: trendAiGuard, | |
| aiGuard: trendAiGuard, |
|
Hi @trend-willem-gooderham , can you please share the latest API docs for Trend AI guard? |
Description: (required)
Note AI App Sec will be GA Dec 1st and this PR can be merged after that date.
Tests Run/Test cases added: (required)
Type of Change: