cisagov / ScubaGoggles

SCuBA Secure Configuration Baselines and assessment tool for Google Workspace
https://www.cisa.gov/resources-tools/services/secure-cloud-business-applications-scuba-project
Creative Commons Zero v1.0 Universal
149 stars 20 forks source link

Remove Version Numbers from Control IDs in the Rego #305

Open adhilto opened 3 months ago

adhilto commented 3 months ago

💡 Summary

Remove the version number from the control IDs in the Rego for maintainability.

Motivation and context

The Rego currently references the baseline controls by their full ID, including the version number. For example: image.

However, the inclusion of the version number makes it challenging to maintain consistency, as the version number is repeated again and again throughout the files. For example, consider https://github.com/cisagov/ScubaGoggles/pull/303, with 101 files changed, just to bump the version number.

Furthermore, moving forward, eventually changing the version numbers will not be a matter of a simple find and replace, as after the 1.0 release, the version numbers for the controls will be independent of each other.

Finally, having the version number listed in the Rego code doesn't really add anything.

Implementation notes

Please provide details for implementation, such as:

Acceptance criteria

As a proof of concept, I removed the version numbers from the Sites Rego, like so: image

Then modified md_parser.py like so: image

And finally modified reporter.py like so: image

Worked like a charm: image

How do we know when this work is done?