Compliance tests in Drata, such as those tied to the Formal Code of Conduct or other policy-specific controls, depend on correctly configured policies. Users can employ built-in Drata templates or their custom policies. Improper handling of archived, replaced, or custom policies can lead to test failures. This guide explains why such failures occur and provides actionable steps to resolve them.
Common Causes of Compliance Test Failures
Archived or Replaced Policies: If a required Drata policy template is archived without a proper replacement, tests relying on that policy will fail. For instance, archiving a Code of Conduct policy without proper replacement might trigger test failures.
Unpublished Custom Policies: Custom policies not replacing the original Drata templates correctly in the system can break the linkage necessary for passing compliance tests.
Default Policy Mapping Errors: Tests may fail when a custom policy, intended to replace a default one, is incorrectly previewed or mapped.
Steps to Resolve Policy-Related Test Failures
Restoring Archived Policies
Navigate to the "Archived Policies" section within the Drata dashboard.
Locate the required original template policies.
Restore the policies and ensure they are published.
If needed, re-run the affected tests to verify resolution.
Replacing Default Policies with Custom Ones
If you want to use custom policies instead of the Drata templates:
Ensure the custom policy replaces the default template in the system.
Access the "Policies Replaced" feature to confirm the replacement.
Publish the custom policy once replacement is configured.
Re-run compliance tests linked to the updated policy.
Mapping and Updating Policies
Align your custom policy to match the compliance requirements of Drata's templated policies.
As an alternative, revert to the built-in Drata policies where custom policies cannot be accommodated.
For guidance, refer to Drata's detailed articles, such as Create and Replace a Policy with Your Custom Policy.