Maintaining Rules
Prerequisites
Step 1: Patchable Rule
**Important**: I will need to update the list of AMIs frequently, so make sure the rule is easy to update later.Step 2: Generate the Patch
/gomboc:fix
I have an existing rule `ensure-ami-is-in-approved-allowlist` that enforces an AMI allowlist. I want to create a new rule that can update that existing rule using the fact that `orl` is a supported language. The new rule should use the `vars.custom.ami_ids` variable as a comma-separated list of AMIs that should be used. This should replace the AMI list in `skip_finding` as an EXPR-style list (see existing rule format), as well as the remediation value as human-readable text.
**Important**: The rule should skip itself (using `skip_expression`) if the variable is not set. If skipped the `skip_reason` should be in the form "Variable 'vars.custom.ami_ids' is not defined. It should be the complete list of valid AMIs".Rule Output Example
Update Workflow
Step 1: Pull updated values
Step 2: Write the variable
Step 3: Pull
Step 4: Patch
Step 5: Publish
Last updated