Skip to content

Fix crash when performing auto-remediation for an unknown OS

Brian Williams requested to merge bwill/fix-remediation-crash into master

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:

  1. Skips remediation if the OS is unknown and logs a message asking to create an issue
  2. Makes remediation_formula crash-proof
  3. Adds regression tests
Edited by Brian Williams

Merge request reports