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

Change yaml parser to org.snakeyaml:snakeyaml-engine #79

Closed
NAJ10 opened this issue Feb 22, 2023 · 8 comments · May be fixed by #83
Closed

Change yaml parser to org.snakeyaml:snakeyaml-engine #79

NAJ10 opened this issue Feb 22, 2023 · 8 comments · May be fixed by #83

Comments

@NAJ10
Copy link

NAJ10 commented Feb 22, 2023

The existing snakeyaml library is listed as vulnerable to security vulnerabilities because it allows create of arbitrary java objects which could lead to remote code execution. org.snakeyaml:snakeyaml-engine seems to be a follow on from the existing snakeyaml library from the same developers but is able to parse YAML 1.2. Please could you consider using snakeyaml-engine to help developers working in organisations where automated security scanning for vulnerable dependencies causes friction between in house security teams and ordinary developers who happen to pull in uap-java as a dependency.

@NAJ10
Copy link
Author

NAJ10 commented Feb 23, 2023

This will also address #68

@bpossolo
Copy link
Contributor

bpossolo commented Feb 26, 2023

At first I was hoping the snakeyaml maintainers would address the issue in their library but I read through their issue/conversation and, apparently, it's very controversial...

I'll check out snakeyaml-engine and see how complicated it is to swap over.

@thomasdarimont
Copy link

How about simply removing the dependency to snakeyaml?

The regex format file regexes.yaml is quite simple and could be parsed by a small handwritten parser that just turns the yaml into a ``Map<String,List<Map<String,String>>>`

@bpossolo
Copy link
Contributor

bpossolo commented Mar 5, 2023

I'd prefer to avoid writing a custom yaml parser

@aminadinari19
Copy link

Hi! There is a new version of snakeyaml (2.0) which seems to be free of vulnerabilities. Do you plan to upgrade to that?

@jmini
Copy link

jmini commented Apr 6, 2023

I have opened a PR to update to version 2.0 of the regular snakeyaml: #82

I agree with the discussion here, snakeyaml-engine might be a good fit for this library:
https://bitbucket.org/snakeyaml/snakeyaml-engine/wiki/Home

@jmini
Copy link

jmini commented Apr 7, 2023

I think it is even better to remove the need to have any YAML parsing at runtime.

So I have opened a PR for that: #83

@bpossolo
Copy link
Contributor

bpossolo commented Nov 28, 2023

I'm pleased to announce version 1.6.1 has been released to Maven Central and the security vulnerability has been addressed.

see here for what's changed
https://github.com/ua-parser/uap-java/releases/tag/v1.6.1

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 a pull request may close this issue.

5 participants