Improve the error reporting for missing credentials in hardening_manifest.yaml and downloads.yaml
This template is ONLY used for enhancement requests. Bug reporting or new feature request issues should use the other template options for issue submission.
Current Behavior
Currently in downloader.py the credentials will be retrieved from the environment using os.getenv which will return None
if the environment variable is missing. This leads to the code reporting an error with the base64 decoding which is not clear to someone who does not know the code.
Purpose
Improving the error at this point would help people hardening their container with troubleshooting.
Plan
Switch from os.getenv()
to os.environ[]
which will throw a KeyError
when the envrionment variable is not found.
Acceptance Criteria
Proper error reporting.
Edited by Kenneth Maguire