Skip to content

[New Plugin] Vigilnz AI Secure - #1767

Open
Susenthiran28 wants to merge 2 commits into
Portkey-AI:mainfrom
Susenthiran28:feat/vigilnz-guardrail
Open

Susenthiran28 wants to merge 2 commits into
Portkey-AI:mainfrom
Susenthiran28:feat/vigilnz-guardrail

Conversation

@Susenthiran28

@Susenthiran28 Susenthiran28 commented Aug 13, 2026

Copy link
Copy Markdown

This PR adds Vigilnz AI Secure guardrail integration to the Portkey Gateway.

Vigilnz AI Secure scans both user prompts and LLM responses through the Vigilnz Guardrail API and applies the security policy configured for the user's Vigilnz tenant.

Key changes

  • Added Vigilnz AI Secure guardrail plugin with support for:

    • beforeRequestHook for prompt/input scanning
    • afterRequestHook for LLM response/output scanning
  • Supports Vigilnz verdicts:

    • Allow — content is safe and the request continues
    • Block — the request/response is blocked based on the configured policy
    • Modify — sensitive content can be redacted before continuing
  • Added credential configuration:

    • Vigilnz API Key — required
    • Vigilnz Base URL — optional for self-hosted/private deployments
  • Added configurable timeout with a default of 5000ms.

  • Added failOnError configuration to control guardrail behaviour when Vigilnz is unavailable.

  • Added gateway-neutral Vigilnz API client and request/response handling.

  • Added documentation and unit tests with mocked Vigilnz API responses.

Tests Run / Test Cases

  • Safe input → request allowed
  • Prompt injection → request blocked
  • Unsafe LLM output → response blocked
  • Sensitive data with redaction enabled → content modified before continuing
  • Vigilnz API authentication failure
  • Vigilnz API timeout/unavailability
  • failOnError enabled and disabled
  • Monitor/enforcement behaviour
  • Input and output guardrail hooks
  • No network calls or real credentials required during unit tests

Tests: 21 unit tests passing, fully mocked.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix
  • Breaking change
  • Documentation update
  • Refactoring

Adds a guardrail plugin that scans prompts and completions via the Vigilnz
AI Secure API and enforces the tenant's server-side policy.

- beforeRequestHook and afterRequestHook
- block, allow and redact (modify) actions
- credentials: apiKey required, baseUrl optional for self-hosted
- configurable timeout (default 5000ms) and failOnError
- 21 unit tests, fully mocked, no network or credentials file
@Susenthiran28
Susenthiran28 force-pushed the feat/vigilnz-guardrail branch from 667a2ab to 61f9d55 Compare August 14, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant