Add prompt_injection_protetion_level backend field
What does this MR do and why?
Extracted from Add a top-level group setting to control prompt... (!216699 - merged)
This MR introduces a column and a backend field prompt_injection_protection_level to namespace_ai_settings
Database Changes
-
Migration: Added
prompt_injection_protection_levelcolumn tonamespace_ai_settingstable
Backend Implementation
-
Model (
Ai::NamespaceSetting):- Added enum for
prompt_injection_protection_levelwith three values
- Added enum for
-
API (
GroupsHelpers):- Added
prompt_injection_protection_levelparameter to group settings API - Accepts values:
no_checks,log_only,interrupt
- Added
-
Feature Flag:
ai_prompt_scanning(gitlab_com_derisk)- Controls visibility of the prompt injection protection settings
The field will be later managed in UI and sent to DWS to control prompt injection scanning.