Fix crash when performing auto-remediation for an unknown OS
Reported in gitlab-org/gitlab#336619 (closed): If an unknown operating system is scanned and remediation is performed, the analyzer will crash with no implicit conversion of nil into String
because remediation_formula
returns nil
.
This MR:
- Skips remediation if the OS is unknown and logs a message asking to create an issue
- Makes
remediation_formula
crash-proof - Adds regression tests
Edited by Brian Williams