Skip to main content

How to review all config policy warnings?

Introduction:

If a project configuration does not comply with the rules of the associated config policy, the warning message will be displayed on the specific project pipeline where the policy is applied.

Currently there is no central place within the UI to review all config policy warnings for all projects, however, it is possible to get the policy decision audit logs, which includes all failed policy decisions (soft or hard fails).

Please note, the config policy logs do not include passing policy decisions.

Prerequisites:

The config policies feature is currently only available on the Scale Plan and from CircleCI server v4.2.

Instructions:

In order to retrieve the policy decision audit logs, you can run the following command using the CircleCI CLI:

circleci policy logs --owner-id ${your-organization-ID} --before ${yyyy/mm/dd} --after ${yyyy/mm/dd} --branch ${your_branch} --out output.json

The --before, --after, --branch and --out flags are optional.

If you are using the circleci policy commands with CircleCI server, you will also need to add the policy-base-url flag to provide your CircleCI server domain:

circleci policy logs --owner-id ${your-organization-ID} --policy-base-url ${your-circleci-server-domain} --after ${yyyy/mm/dd} --branch ${your_branch} --out output.json

Additional Resources:

Did this answer your question?