External rules can either be defined by some plugins (using RulesDefinition API), or dynamically created during analysis, based on issues in the scanner report.
It is important to distinguish the two cases, since we might want to purge external rules that are not predefined, when no more issues are associated to them.
- A new boolean column RULES#IS_AD_HOC will be added. Default value is false.
- A migration should feed this column to true
- When registering rules at startup, this flag should be set to false for all rules