Add New indicator to Security nav items behind a flag

What does this MR do and why?

Shows a "New" badge on the Security configuration (project and group) and Security inventory (group) nav items, so users can discover the new Automated Triage and Remediation profiles.

The badge shows only when all of these are true:

  • the security_nav_indicator feature flag is enabled for the root group
  • the user can apply_security_scan_profiles
  • the user has not visited that page (the callouts added in the parent MR)
  • the indicator has not expired (Security::NavIndicator::EXPIRES_ON)

Dismissing the callout on page visit is not part of this MR, so the badge does not clear yet. It follows in a separate MR, and the flag stays off until then.

The project Security configuration item is defined in the CE menu, so it gets a configuration_menu_item_badge hook that returns nil, overridden in EE.

Note: this is stacked on the parent MR and must be merged after it.

References

Screenshots or screen recordings

Before After
as admin

Screenshot 2026-11-08 at 15.00.20.png

group page:

Screenshot 2026-11-08 at 14.57.50.png

subgroup page:

image.png

project page:

image.png

as a developer

Screenshot 2026-11-08 at 15.00.20.png

group page:

image.png

project page:

image.png

user with maintainer permissions project only:

Screenshot 2026-11-08 at 15.00.20.png

image.png

How to set up and validate locally

  1. In a rails console, enable the flag for a group with an Ultimate license:

    Feature.enable(:security_nav_indicator, Group.find_by_full_path('<group-path>'))
  2. Sign in as an Owner, Maintainer or Security Manager of that group and open the group or one of its projects.

  3. Check that Security configuration (project and group) and Security inventory (group) show a New badge in the sidebar.

  4. Sign in as a Developer or Reporter of the same group. The Security configuration and Security inventory items are visible, but without the New badge, because the user cannot apply security scan profiles.

  5. Disable the flag and check the badge is gone.

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

Merge request reports

Loading
Loading