AI REVIEWED
Module: cli
File: cli/format/YamlSnakeYamlFormatHandler.java (~line 175)
Severity: Medium
Summary
The catch block uses Exception instead of SnakeYAML-specific exceptions, potentially swallowing unexpected errors like ClassNotFoundException, SecurityException, etc.
catch (final Exception e) { // too broad
throw new FormatParseException("Failed to parse YAML: " + e.getMessage(), e);
}
Suggested Fix
catch (final YAMLException | ClassCastException e) {
throw new FormatParseException("Failed to parse YAML: " + e.getMessage(), e);
}