Metadata Rules
  • 12 Aug 2022
  • 1 Minute to read
  • Contributors
  • Dark

Metadata Rules

  • Dark

As of version 4.4.2, CodeScan has a set of Metadata rules.

These rules allow you to scan your settings to ensure that your Org is secure and clean.

To enable downloading metadata for your Salesforce project, you will need to change some project settings. Remember that the following will only work with code being pulled from Salesforce.

  1. First, open your Salesforce project and navigate to Project Settings > General Settings menu.

  2. Next, click the CodeScan tab on the left to open the CodeScan specific settings and access the CodeScan Cloud Download Types.

  3. The default values will be ApexClass, ApexComponent, ApexPage, ApexTrigger, AuraDefinitionBundle, and LightningComponentBundle. To download all metadata currently checked, you will need to add the following:

    • CustomObject
    • Profile
    • SharingCriteriaRule
    • SharingOwnerRule
    • SharingTerritoryRule
    • Settings
  4. After you have added these package types, click on the Save button.

  5. To rerun the analysis, go to the Overview > Project Settings > General Settings menu. Your metadata files will download, and the ruleset will be applied.

Metadata Rules on Self Hosted

As of CodeScan version 4.4.2, metadata rules are available in Self Hosted CodeScan.

You will need to add the required file types to your package.xml file to pull your metadata.

We have provided a package.xml file below. Download the XML file from here to get started with Self-Hosted CodeScan,


Was this article helpful?