Skip to content

Log successful yaml annotation

What does this MR do and why?

We have implemented policy YAML annotation in this issue: #497774 (closed)

To understand the usage, simple JSON logging will be useful.

References

#550443

How to test locally

https://docs.gitlab.com/user/application_security/policies/#annotate-ids-in-policyyml

  1. Create a project

  2. Navigate to "Secure => Policies"

  3. Create a security policy referencing some ID fields.

  4. Update the security policy policy.yml file with the experiments option enabled:

    Add this at the end of .gitlab/policies/policy.yml in the security policy project

    experiments:
      annotate_ids:
        enabled: true
  5. Now go to Secure => Policies and update the policy

  6. Create a merge request. (This will annotate the IDs in the policy.yml )

  7. Open log/application_json.log in your local GitLab project

  8. Search for "Successfully annotated policy YAML" message

Edited by Imam Hossain

Merge request reports

Loading