Skip to content

Conversation

testisnullus
Copy link

This PR replaces SnakeYAML 1.26 with SafeYAML 1.34.1

This change replaces the outdated SnakeYAML library that contains critical vulnerabilities with SafeYAML to address security considerations and improve YAML parsing safety.

patch by Danylo Savchneko

Copy link

@mattsheppard-instaclustr mattsheppard-instaclustr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks sensible to me in terms of satisfying scanners which are flagging https://nvd.nist.gov/vuln/detail/CVE-2022-1471. I think the key question, though, is whether this switch creates any runtime issues for Cassandra, which will need some testing to confirm.

We will also, I think, want to move this forward to 4.1.10.

<dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/>
<dependency groupId="com.github.jbellis" artifactId="jamm" version="${jamm.version}"/>
<dependency groupId="org.yaml" artifactId="snakeyaml" version="1.26"/>
<dependency groupId="com.konloch" artifactId="safeyaml" version="1.34.1"/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh - Reading https://github.com/Konloch/SafeYAML/ they seem to recommend using 1.33.0 rather than 1.34.1. Is there a reason you think we should prefer 1.34.1?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to build and use the 1.33.0 version, but it seems that there is no such branch in the repo right now. I've downloaded the 1.33.0 from the releases page and built mine from sources, and compared them. There are no differences between them right now, so I used 1.34.1.

Furthermore, there are no transitive dependencies for the snakeyaml that were mentioned in the SafeYaml Readme file, so I've decided to use the latest one.

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used this command to check BTW:

japi-compliance-checker ~/Downloads/safeyaml-1.33.0.jar ../cassandra/build/lib/jars/safeyaml-1.34.1.jar

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants