Skip to content

Audit dast schedule owner updates

Marcos Rocha requested to merge mc_rocha-audit-schedule-owner-change-335662 into master

What does this MR do and why?

Add the owner information to the list of auditable attributes updated by ee/app/services/app_sec/dast/profiles/update_service.rb .

The schedule owner is updated to the current user if it's not valid.

This update should be auditable.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Follow the steps described here to trigger the owner update.

  2. Check the audit table

audit_events = AuditEvent.where(target_id: dast_profile.dast_profile_schedule.id)
messages = audit_events.map(&:details).pluck(:custom_message)

[31] pry(main)> messages = audit_events.map(&:details).pluck(:custom_message)
=> ["Changed DAST profile schedule user_id from 100 to 1"]

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 Marcos Rocha

Merge request reports