Skip to content

Add audit events for fork unlink action

sameer shaik requested to merge sshaik-ta into master

What does this MR do and why?

This MR intends to add a project level audit event when the user removes the fork relationship.

Adds a new EE scoped service UnlinkForkService that overrides the execute method in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/services/projects/unlink_fork_service.rb service - This adds a project level audit event for fork unlink action.

Screenshots or screen recordings

Screenshot_2022-10-15_at_12.44.29_PM

After the removal of fork relationship::

Screenshot_2022-10-15_at_12.45.26_PM

How to set up and validate locally

  1. Checkout to this feature branch
  2. Fork a project
  3. In the forked project, unlink the fork relationship from Settings -> General -> Advanced section click Remove fork relationship button
  4. Navigate to Security & Compliance -> Audit events section
  5. Notice that the fork unlink action is logged in the audit events list

NoteL Audit events feature is only available for paid tiers.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by sameer shaik

Merge request reports