ComplianceAsCode / ComplianceAsCode/content
Duplicate key members holding rule ID
- Dominant language
- Shell
- Stars
- 2.8k
- Forks
- 828
- Avg merge
- 3d 8m
- Merged PRs (30d)
- 80
Description
#### Description of problem:
During our work on https://github.com/ComplianceAsCode/content/pull/9870, we have discovered that some templates require to be passed both `_rule_id` and `rule_id` variables in their parameters. But, they both seem to contain the same value.
Some parts of our code use the former, other parts use the latter. That's confusing and complicates the logic.
For detailed analysis, see the discussion in https://github.com/ComplianceAsCode/content/pull/9870/files#r1031371254.
To solve this we should perform refactoring and unify the code and variable usage.
#### SCAP Security Guide Version:
current upstream as of 2022-11-24 as of HEAD e07cb1177d5f4f738bf1f9e273e98061963e8454
#### Operating System Version:
all
#### Steps to Reproduce:
inspect the variables passed to template engine
#### Actual Results:
rule ID is stored twice
#### Expected Results:
rule ID is stored once, every code uses only the `rule_id` key
#### Additional Information/Debugging Steps:
Contributor guide
Assessment
This issue has not been assessed yet.