Loading
Add a variable table to each scan trigger card in Manage profiles
What does this MR do and why?
The Manage profiles drawer's read-only detail pane and its edit form both render one card per scan trigger, but neither showed which analyzer settings that specific trigger actually sets, only the profile-wide "Advanced configuration" table further down. This adds a small Variable/Value table directly inside each trigger's own card, matching the per-trigger table already shown in the scan profile details modal (!256418).
Where to look
This change spans multiple components. Here's a guide to the file groups:
- New reusable display component (
trigger_variable_table.vue) - extracts a small Variable/Value table from existing inline markup with no behavior change. - New reusable edit widget (
advanced_configuration_value_field.vue) - renders the correct input widget (radio group, textarea, or plain text input) based on the variable's value type. - Enhanced table component (
advanced_configuration_table.vue) - adds aneditableprop to support per-trigger row editing using the new field widget. - Enhanced modal (
add_scan_profile_variable_modal.vue) - extends the add/edit variable modal to set different values per trigger instead of one shared value. - Integration points (
scan_profile_edit_form.vue,advanced_configuration_editor.vue,scan_profile_detail.vue,scan_triggers_detail.vue) - wires the new per-trigger editing capability into the existing edit and detail views. - Shared utilities (
utils.js,variable_definitions.js) - helpers and definitions for handling boolean/enum/stringList value types consistently.
References
- issue: [Frontend] Scan profile drawer: view, create, e... (#624191 - closed)
- parent feature-flag issue: [FF] `custom_scan_profiles_ui` -- advanced conf... (#629160)
- parent work item: Advanced Configuration Profiles for Security Sc... (gitlab-org#20193)
- Design:
security-inventory-profiles
Screenshots or screen recordings
| before | after | |
|---|---|---|
| manage profiles | ||
| add scanner wizard (the same) |
How to set up and validate locally
- Have a GitLab Ultimate licence and enable the flag for a group:
echo "Feature.enable(:custom_scan_profiles_ui, Group.find(ID))" | gdk rails c - Go to a group's
Secure>Security configuration, then click Manage profiles next to a scanner (Secret Detection or SAST). - Select an existing custom profile whose triggers have different analyzer settings (or create one and set values that differ per trigger through Advanced configuration), then close the form. Each configurable trigger's card in the read-only pane should show its own Variable/Value table, listing only the settings that trigger sets. A trigger with nothing configured shows no table.
- Click Edit on that profile. The same per-trigger tables should appear in the edit form's trigger cards, and should update live as values are changed through Advanced configuration below (for example, clearing a setting from a trigger removes it from that trigger's table without affecting the others).
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Chen Charnolevsky