Once you have created policy rules, you can manage them from the Policy Rules page. Policy rules are organized into different tabs:
Each section separates its available rules into three categories:
You can learn about each category below.
To manage and make changes to policy rules, you must have at least a Developer role.
All rules that Code Defender currently enforces are in the Active tab. There are two types of active rules: mitigation rules and classification rules.
Mitigation rules are rules where Code Defender or PCI DSS automatically block or allow script actions if they are present on the deny or allow list respectively. You can click on each rule to view the deny or allow list.
Mitigation rules are prioritized over classification rules. For example, if a script action already exists on the deny list, then Code Defender will block that action and will not process any other rules. This means that, if a classification rule exists for that action, Code Defender will never consider it. For more information, see Active rule priority.
Classification rules are custom rules you created. Code Defender processes these rules if the script action doesn’t match any conditions in Mitigation rules.
You can click a classification rule to view its conditions and perform the following actions:
You can also drag and drop rules to update Code Defender’s rule priority.
Code Defender evaluates each script action against active rules by order of priority starting with Mitigation rules and then Classification rules with rule number 1. This means that, when matching script actions to policy rules, Code Defender uses the following logic:
This means that if you have two or more policy rules with matching conditions, then Code Defender will prioritize completing the action associated with the earlier rule, then stop considering the remaining rules. So, for example, say your policy rules are ordered like this:
If your application receives a script from the specified vendor Policy Rule 3, and this script performs the specified undesired actions, those script actions will not be blocked even though the rule exists. This is because this vendor is also considered a known vendor in Policy Rule 2. Since the latter is the earlier rule, it is prioritized, and the vendor will be allowed. Code Defender will never continue on to the next rule.
All rules that you’re currently editing or are not yet active are in the Draft tab. You can click a rule to view its conditions and perform the following actions:
All rules that were previously active but have since been deactivated are in the Archive tab. You can click a rule to view its conditions and perform the following actions: