How to Retrieve Copado Compliance Hub Sample Rules from the Unlocked Package

Updated 1 week ago by Copado Solutions

As mentioned in the How to Create a Compliance Rule article a compliance rule is a compilation of criteria, which are a collection of statements and the logic that is considered by Copado's scanner when a compliance scan is executed. 

You can download these rules from DevOps Exchange in the Success Community and import them into your org. Let’s take a look at the steps you need to follow to retrieve the rules from the unlocked package. 

  1. Navigate to DevOps ExchangeCCH Preset Rules listing to install the latest package version. 
  2. Install the package for 'Admin users only'.
  3. After the package has been successfully installed, navigate to the Developer Console.
  4. Click on Debug and select Open Execute Anonymous Window.
  5. Paste the following code snippet:
new copaCchPresets.ImportPresetComplianceRules().execute();
  1. Click on Execute

Copado Compliance Hub preset rules are now added to your org and are ready to use for your scans.  

  • To review the new imported CCH Preset Rule Group, navigate to Compliance Rule Groups and select All list view. 
Compliance Rule Groups

  • To review the preset rules that have been imported, navigate to Compliance Rules and select All list view, or navigate to the Related list→Compliance Rule Group Items of the CCH Preset Rule Group.
    Compliance Rules
  • To review the rule criterias, navigate to Compliance Rule Criterias and select All list view. 
Compliance Rule Criterias
To the extent that the Compliance Rules are modified, Copado is not responsible for errors or performance failures.


How did we do?