The "Distribution of Custom Rules" in the main README states:
Any custom rules should derive from CfnNag::BaseRule in cfn-nag/base_rule (not cfn-nag/custom-rules/base)
The custom rule development doc states the following for storing custom rules in a directory of my choice
You'll need to modify the import of the BaseRule class from require_relative 'base' to require 'cfn-nag/custom_rules/base'.
In order to get custom rules to work, I either needed to:
- Place them in cfn-nags defined custom rule directory, using
require relative 'base' and extending the BaseRule class
- Place them in the directory of my choosing, use
require 'cfn-nag/custom_rules/base' and extend the BaseRule class (extending CfnNag::BaseRule did not work).
Neither of these solutions seem to align with the text in the base README.