Audit Events for flows
What does this MR do and why?
This code change adds audit logging capabilities for AI Catalog flows. Previously, the system only tracked audit events (security logs) for AI agents, but now it also monitors when users create, update, delete, enable, or disable AI flows within projects and groups.
The implementation creates a new audit message service specifically for flows that generates detailed descriptions of what changed - such as which tools, prompts, routes, or components were added or removed. It also improves the existing agent audit service by making scope information (project vs group) more specific and handling cases where agents have no tools configured.
The changes include updating documentation to list the new audit event types, adding configuration files that define these events for GitLab version 18.6, and modifying the underlying services to trigger audit logging when flow operations occur. This ensures administrators have complete visibility into AI catalog activities for compliance and security monitoring purposes.
Reference Issues - #566901 (closed) & #580582 (closed)
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Enable
global_ai_catalogandai_catalog_item_project_curationFeature flag. - Create an new flow from Explore > Ai Catalog > Flows
- Go to project for which you have created agent. Let's say you created agent on Gitlab Duo > test project. Then go to Project audit event page of the project. Secure > Audit events (url: http://gdk.test:3000/gitlab-duo/test/-/audit_events)
- You will be able to see 2 audit event for creation as showing in below image.
- Go to flow and enable it to group (Gitlab Duo)
- Then go to Gitlab Duo group > Secure > Audit events, you will see below event
- Now go to test project (on Gitlab Duo group) and then Automate > Flow > enable flow > enable above created flow to this project
- Go to Project level audit logs
- Now remove flow from the project
- Remove flow from the group
- Go to Explore > Flow > Your Flow > Edit. Now update flow yaml, visibility of the flow etc. Then see audit logs
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.
Related to #566901 (closed)






