Skip to content

Add audit event for external status check update

What does this MR do and why?

This MR adds audit event logging for external status check updates in merge requests. When a status check response is updated, the system will now record an audit event with relevant details including the status check name, status, and associated merge request information.

This enhancement improves security observability by providing a clear audit trail when external status checks are updated, allowing administrators to track who made changes to status checks and when these changes occurred.

Implementation details

  • Created a new audit event type status_check_response_update with appropriate configuration
  • Added audit event logging in the ExternalStatusChecks::Responses::CreateService
  • Refactored the status check response creation in the API to use the service pattern
  • Added comprehensive tests to verify audit event logging functionality

References

Related to #413535 (closed)

How to set up and validate locally

  1. Enable the external status checks feature flag if needed
  2. Create a merge request with an external status check configured
  3. Update the status check response via API
  4. Verify in the audit log that the event was recorded with all relevant details

MR acceptance checklist

  • Code follows GitLab coding standards
  • Tests added to verify functionality
  • Documentation updated as needed
  • Security considerations addressed (proper audit event logging)
  • Performance impact is minimal

Related to #413535 (closed)

Edited by Alan (Maciej) Paruszewski

Merge request reports

Loading