Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault Hardening check doesn't skip commented out parameters #101

Open
2 tasks
ediulia opened this issue Jun 1, 2022 · 0 comments
Open
2 tasks

Vault Hardening check doesn't skip commented out parameters #101

ediulia opened this issue Jun 1, 2022 · 0 comments

Comments

@ediulia
Copy link
Contributor

ediulia commented Jun 1, 2022

Summary

Script will drop an error on checking the keys If your DBParm.ini has commented out parameters as examples

Steps to Reproduce

  1. Go to DBParm.ini on the Vault
  2. Duplicate any key parameter, for instance, ServerPrivateKey=, and mark the duplicate parameter out. So the parameter will look like this:
    *ServerPrivateKey=
  3. Restart the Vault to be sure the DBParm.ini is properly loaded
  4. Run the Hardening Check script on the Vault
  5. Review the log and the HTML report

Script will try to validate the empty path for the marked out parameter anyway and will endup with error
Cannot bind argument to parameter 'Path' because it's empty string

Expected Results

The script should skip the marked out parameters for checking

Actual Results

image

Reproducible

  • [ X] Always
  • Sometimes
  • Non-Reproducible

Additional Information

The bug is in the VaultHardeningSteps.psm1 where the script is trying to get the list of the keys into the $keyslist variable
image

For each key to be searched for, the "^" regex character has to be added. this will allow searching fr strings from the line beginning only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants