Open SourceAI Safety 🇷🇺 24.07.2026 06:01

Cloud.ru Open-Sources Guardrails Filter for Data Protection in LLM Workflows

Cloud.ruCloud.ru
Cloud.ru has released the source code of its Guardrails Filter, a transparent reverse proxy that removes sensitive data from requests to LLMs and restores it in responses. The tool includes ~260 built-in rules for detecting and masking personal data, API keys, and more, with support for streaming and tool calls. It is available as a standalone service or as an Envoy ext_proc sidecar.
Cloud.ru open-sourced Guardrails Filter, a transparent reverse proxy between clients and LLM providers that removes sensitive data from requests and restores it in responses. The tool was originally developed for Cloud.ru's own platform to prevent data leakage when using external LLMs. It uses regular expressions and checksums to detect and mask sensitive information such as names, addresses, phone numbers, INN, passport data, and API keys. The filter supports streaming responses and tool calls, and sensitive values are stored temporarily in memory, Redis, or PostgreSQL with encryption. Two deployment options are available: a standalone Go binary with a web console and Prometheus metrics, and an ext_proc sidecar for Envoy-based infrastructure. The tool includes about 260 built-in rules covering Russian PII (SNILS, INN, OGRN) and secrets/API keys. According to benchmarks, precision is 92–99.9%, recall 75–87%, and F1-score 82–93%. The solution uniquely restores original data in streaming SSE responses and tool call arguments, unlike alternatives. Cloud.ru plans to integrate an NER model for edge cases.
Сокращения
LLM = Large Language Model — большая языковая модель
PII = Personally Identifiable Information — персональные данные
NER = Named Entity Recognition — распознавание именованных сущностей
SSE = Server-Sent Events — события, отправляемые сервером
API = Application Programming Interface — интерфейс программирования приложений
CPU = Central Processing Unit — центральный процессор
RAM = Random Access Memory — оперативная память
F1 = F1 score — F1-мера
SNILS = Individual Personal Account Insurance Number (Russia) — СНИЛС
INN = Individual Taxpayer Number (Russia) — ИНН
OGRN = Primary State Registration Number (Russia) — ОГРН
Source: Habr — хаб ИИ — original
Our earlier posts on this topic ↓
Fresh news