Added model selection for SAST VR and secret FP detection workflows
What does this MR do and why?
Adds independent model selection for two vulnerability management workflows, decoupling them from the generic `duo_agent_platform` feature setting so administrators can configure dedicated models for each.
Changes
Secret Detection False Positive Detection (`secrets_fp_detection/v1`):
- Added `secret_vulnerability_fp_detection: 19` to feature enums
- Added workflow routing to return `:secret_vulnerability_fp_detection` for `secrets_fp_detection/v1`
- Set `ai_feature: "secret_vulnerability_fp_detection"` on the foundational flow entry
SAST Vulnerability Resolution (`resolve_sast_vulnerability/v1`):
- Added `sast_vulnerability_resolution: 20` to feature enums
- Added workflow routing to return `:sast_vulnerability_resolution` for `resolve_sast_vulnerability/v1`
- Set `ai_feature: "sast_vulnerability_resolution"` on the foundational flow entry
Both features also include feature metadata entries, factories, and specs.
Companion MR
AI Gateway: gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!4910 (merged) — adds `secret_vulnerability_fp_detection` and `sast_vulnerability_resolution` entries to `unit_primitives.yml`. Already merged.
How to set up and validate locally
- Make sure langsmith tracing is enabled.
- Set the env variable `FETCH_MODEL_SELECTION_DATA_FROM_LOCAL=true`.
- Visit the model selection page: Group → Settings → GitLab Duo → Configure Features.
- You will see options for Secret Vulnerability FP Detection and SAST Vulnerability Resolution at the bottom.
- Trigger the respective workflow on a vulnerability page and verify the selected model is used in the langsmith trace.
References
- Related to https://gitlab.com/gitlab-org/gitlab/-/issues/592321 (Secret FP detection)
- Related to https://gitlab.com/gitlab-org/gitlab/-/issues/592320 (SAST VR)
- Supersedes !227467 (closed) and !227602 (closed)
