Overwriting baseline files #320

Closed
opened 2026-01-19 18:30:03 +00:00 by michael · 1 comment
Owner

Originally created by @robertgendler on GitHub.

Summary

Running one of the scripts with the wrong option and without pointing at a baseline file can result in the baseline being over wrote with a 0 byte file

Steps to reproduce

python3 yaml-to-xls.py -o ../baselines/all_rules.yaml
usage: yaml-to-xls.py [-h] [-o OUTPUT] baseline
yaml-to-xls.py: error: the following arguments are required: baseline

What is the expected correct behavior?

The all_rules or any baseline is not over wrote and since no baseline was defined, the script should quit without writing any data.

Originally created by @robertgendler on GitHub. <!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Running one of the scripts with the wrong option and without pointing at a baseline file can result in the baseline being over wrote with a 0 byte file ### Steps to reproduce python3 yaml-to-xls.py -o ../baselines/all_rules.yaml usage: yaml-to-xls.py [-h] [-o OUTPUT] baseline yaml-to-xls.py: error: the following arguments are required: baseline ### What is the expected *correct* behavior? The all_rules or any baseline is not over wrote and since no baseline was defined, the script should quit without writing any data.
Author
Owner

@robertgendler commented on GitHub:

Resolved. The generate_guidance will now only build to the build directory.

@robertgendler commented on GitHub: Resolved. The generate_guidance will now only build to the build directory.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#320