Repository navigation
bug: bump snakeyaml 1.17 -> 1.32 (CVE-2022-41854, SNYK-JAVA-ORGYAML-3113851) - #434
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes code-scan finding
sfind-156b41a8(SnykSNYK-JAVA-ORGYAML-3113851, CVE-2022-41854, stack overflow on deeply nested YAML; low, CVSS 3.7).org.yaml:snakeyaml@1.17came in transitively viaspring-boot-starter-web@1.5.4.RELEASE.<properties> <java.version>1.8</java.version> + <snakeyaml.version>1.32</snakeyaml.version> </properties>The Boot 1.5.x
spring-boot-dependenciesBOM manages snakeyaml at${snakeyaml.version}, so overriding the property is all that's needed. 1.32 is the lowest fixed version. It's a minor bump within 1.x. The Boot parent and Java 1.8 are unchanged, and Snyk's suggested path (Boot 3.0) is not used.Verification
I couldn't run the real build here: this session's network allowlist blocks Maven Central and
api.snyk.io, and the 1.5.4 parent isn't in the local~/.m2. To check the change anyway, I copiedUserFront/pom.xmland switched it to the cached Boot 1.5.8 parent:dependency:tree -Dincludes=org.yamlresolvesspring-boot-starter-web -> spring-boot-starter -> org.yaml:snakeyaml:jar:1.32:runtime, where it was1.17before.spring-boot-starter-webruntime classpath with-Xss512k. 1.32 isn't cached, so 1.33 stood in for it:YamlPropertySourceLoaderloads a sample config fine.new Yaml().load("[[[[…" x100000)throwsStackOverflowError(vulnerable).YamlPropertySourceLoaderstill loads fine. The same input throwsYAMLException: Nesting Depth exceeded max 50(fixed).application.yml; config isapplication.properties. snakeyaml is only used if a YAML config is added.Not done (network):
mvn test(the only test isUserFrontApplicationTests, which also needs MySQL) and a Snyk re-scan.snyk testfails withSNYK-CLI-0000, so I have no before/after Snyk issue count. The expected result is that this issue (and the other snakeyaml 1.x issues fixed by 1.32) disappears and CVE-2022-1471 remains, since that one needs 2.x.Overlap
This duplicates earlier work, and only one of these should land: open PR #226 (
snakeyaml.version1.33), the existing branchdevin/1790739497-snakeyaml-1.32(identical diff), and PR #171 (2.0, which also covers CVE-2022-1471). I opened a new PR anyway because each new finding gets its own PR.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/8e6dbf5bad884f4aae779d4373dfaae7
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/8e6dbf5bad884f4aae779d4373dfaae7?variant=devin
Devin Review