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

Migrate from yaml.v2 to yaml.v3 #156

Merged
merged 1 commit into from
May 30, 2024
Merged

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented May 29, 2024

Since there is already a dependency on yaml.v3, we might as well upgrade the project to use yaml.v3 too.

One change that affected normalizations.yaml was how YAML anchors are merged so I needed to add the what: user-session to retain the previous output in tests.

Also in normalizations.yaml I noticed there were unused macros and I removed them.

This relates to GHSA-hp87-p4gw-j4gq which was flagged by Github after intoduction in bebb5c6, but the project is not vulnerable as per https://pkg.go.dev/vuln/GO-2022-0603 because it does not use gopkg.in/yaml.v3#Unmarshal.

Since there is already a dependency on yaml.v3, we might as well upgrade the project
to use yaml.v3 too.

One change that affected normalizations.yaml was how YAML anchors
are merged so I needed to add the `what: user-session` to retain the previous output in tests.

Also in normalizations.yaml I noticed there were unused macros and I removed them.
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@andrewkroh andrewkroh marked this pull request as ready for review May 29, 2024 16:51
@andrewkroh andrewkroh requested review from aleksmaus and efd6 May 29, 2024 16:58
Copy link
Member

@aleksmaus aleksmaus left a comment

Choose a reason for hiding this comment

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

Thank you! 👍

I thought of doing that in my previous PR but stumbled on the unit test that got broken and decided to keep it small.

@andrewkroh andrewkroh merged commit f626137 into elastic:main May 30, 2024
3 checks passed
renini pushed a commit to renini/go-libaudit that referenced this pull request Jun 26, 2024
Since there is already a dependency on yaml.v3, we might as well upgrade the project
to use yaml.v3 too.

One change that affected normalizations.yaml was how YAML anchors
are merged so I needed to add the `what: user-session` to retain the previous output in tests.

Also in normalizations.yaml I noticed there were unused macros and I removed them.
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.

4 participants