mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-03-06 18:01:59 +00:00
Add an "id:" tag to the baseline .yaml files for easier distinction between baselines versus using the "title:" tag #251
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liquidoshin on GitHub.
Problem to solve
My software I'm writing gathers all the baseline files, parses each file and stores each files sections/tags into an object. It would be easier to have a separate tag called, for instance, "id:" with just the baseline name and not all the other contents that exists in the title tag. This would make for easier string comparison to make sure the application is looking at the right baseline by doing a simple
if id == "800-53-r5" ......
versus having to get into using regex on the title to get the baseline that it actually is.
Intended users
Anyone writing software that utilizes this macOS_security repo. Adding this new tag wouldn't (to my knowledge) ruin anyone's pre-existing code as it's just an additional tag (unless someone was using the exact format of the yaml file in a way that any changes altered their object etc).
Further details
Proposal
Just add an id: tag to each baseline with the value of that tag being the guidance name. Essentially the id tag value would be the yaml file's name minus the .yaml so 800-53r5_high or DISA-STIG or cnssi-1253 etc...
Documentation
Testing
What does success look like, and how can we measure that?
Links / references
@brodjieski commented on GitHub:
Since the id: tag you are suggesting is just the file name minus the .yaml, would you be able to just read the file name and use that for your needs?