Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MONIT-34093 - Upgrade to snakeyaml 2.0 for CVE-2022-1471 #839

Merged
merged 3 commits into from
Apr 4, 2023

Conversation

ajackson
Copy link
Contributor

@ajackson ajackson commented Apr 4, 2023

  • explicitly add dependency on snakeyaml since we import it directly in the code
  • update test to use explict loadOptions on the YamlFactory for the objectmapper

ajackson added 3 commits April 4, 2023 13:08
- explicitly add dependency on snakeyaml since we import it directly in the code
- update test to use explict loadOptions on the YamlFactory for the objectmapper
- explicitly add dependency on snakeyaml since we import it directly in the code
- update test to use explict loadOptions on the YamlFactory for the objectmapper
- code cleanup in LogsIngesterTest
- explicitly add dependency on snakeyaml since we import it directly in the code
- update test to use explict loadOptions on the YamlFactory for the objectmapper
- code cleanup in LogsIngesterTest
@ajackson
Copy link
Contributor Author

ajackson commented Apr 4, 2023

All test pass but not sure what if anything this breaks in jackson-databind itself with snakeyaml 2.0

@locke-chappel
Copy link

Assuming jackson-dataformat-yaml is compatible with SnakeYaml 2.x this is the preferred solution (they claim to use the parser directly so they may have some issues like we did in our tests).

This mitigates the CVE and addresses scanning issues.

@ajackson
Copy link
Contributor Author

ajackson commented Apr 4, 2023

The PR to upgrade snakeyaml in jackson is only a version change in the pom and was merged for inclusion in version 2.15.
FasterXML/jackson-dataformats-text#390

Copy link
Contributor

@laullon laullon left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@locke-chappel locke-chappel left a comment

Choose a reason for hiding this comment

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

Change resolves the CVE and based on jackson project issue tracker it should be compatible with the current version.

@ajackson ajackson merged commit 5cb1caa into master Apr 4, 2023
@ajackson ajackson deleted the jackson/MONIT-34093-2 branch April 4, 2023 21:10
laullon pushed a commit that referenced this pull request Apr 5, 2023
* MONIT-34093 - Upgrade to snakeyaml 2.0 for CVE-2022-1471
- explicitly add dependency on snakeyaml since we import it directly in the code
- update test to use explict loadOptions on the YamlFactory for the objectmapper
- code cleanup in LogsIngesterTest
laullon added a commit that referenced this pull request May 10, 2023
* dev: (37 commits)
  MONIT-30797: CVE-2021-20293 (6.1) - wavefront-proxy (resteasy-jaxrs) (#844)
  [release] prepare for next development iteration
  [release] prepare release for proxy-12.4
  update open_source_licenses.txt for release 12.4
  update open_source_licenses.txt for release 12.4
  MONIT-34326: Remove preprocessor rules returned from server (#848)
  MONIT-34487: Force GZIP on server api requests (#849)
  MONIT-34300: Hide sensible config option (token) from the Proxy log (#845)
  MONIT-33770: Proxy Ingest without Admin Auth (#842)
  [release] prepare for next development iteration
  [release] prepare release for proxy-12.3
  update open_source_licenses.txt for release 12.3
  Merge dev to 12.x branch (#841)
  Monit 34005: Fix crash on bad URL config (#837)
  Merge dev to 12.x branch (#840)
  MONIT-34093 - Upgrade to snakeyaml 2.0 for CVE-2022-1471 (#839)
  [release] prepare for next development iteration
  [release] prepare release for proxy-12.2
  update open_source_licenses.txt for release 12.2
  Fix failing HttpEndtoEndTest (#835)
  ...

# Conflicts:
#	proxy/pom.xml
#	proxy/src/main/java/com/wavefront/agent/AbstractAgent.java
#	proxy/src/main/java/com/wavefront/agent/ProxyCheckInScheduler.java
#	proxy/src/main/java/com/wavefront/agent/ProxyConfig.java
#	proxy/src/main/java/com/wavefront/agent/PushAgent.java
#	proxy/src/main/java/com/wavefront/agent/api/APIContainer.java
#	proxy/src/main/java/com/wavefront/agent/api/NoopProxyV2API.java
#	proxy/src/main/java/com/wavefront/agent/config/ReportableConfig.java
#	proxy/src/main/java/com/wavefront/agent/core/handlers/DeltaCounterAccumulationHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/core/handlers/HistogramAccumulationHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/core/handlers/ReportPointHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/core/handlers/SpanHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/data/LogDataSubmissionTask.java
#	proxy/src/main/java/com/wavefront/agent/handlers/AbstractReportableEntityHandler.java
#	proxy/src/main/java/com/wavefront/agent/handlers/EventHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/handlers/ReportLogHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/handlers/ReportSourceTagHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/handlers/SpanLogsHandlerImpl.java
#	proxy/src/main/java/com/wavefront/agent/listeners/AbstractLineDelimitedHandler.java
#	proxy/src/main/java/com/wavefront/agent/listeners/RelayPortUnificationHandler.java
#	proxy/src/main/java/com/wavefront/agent/listeners/WavefrontPortUnificationHandler.java
#	proxy/src/main/java/com/wavefront/agent/logsharvesting/InteractiveLogsTester.java
#	proxy/src/main/java/com/wavefront/agent/preprocessor/InteractivePreprocessorTester.java
#	proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorConfigManager.java
#	proxy/src/test/java/com/wavefront/agent/ProxyConfigTest.java
#	proxy/src/test/java/com/wavefront/agent/PushAgentTest.java
#	proxy/src/test/java/com/wavefront/agent/histogram/PointHandlerDispatcherTest.java
#	proxy/src/test/java/com/wavefront/agent/logsharvesting/LogsIngesterTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants