From 94b1dd04bd3f8b8402389d124e9c53e877313554 Mon Sep 17 00:00:00 2001 From: jasonborg <48138260+jasonborg@users.noreply.github.com> Date: Mon, 29 May 2023 13:51:33 +0000 Subject: [PATCH] chore: Bump snakeyaml version to 2.0 (from 1.32). (#74) --- WORKSPACE | 2 +- src/agent/internals/pom.xml | 2 +- .../google/devtools/cdbg/debuglets/java/YamlConfigParser.java | 3 ++- src/codegen/pom.xml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index be2dd3e6..6226db5c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -36,7 +36,7 @@ maven_install( "org.ow2.asm:asm:9.1", "org.ow2.asm:asm-commons:9.1", "org.ow2.asm:asm-util:9.1", - "org.yaml:snakeyaml:1.32", + "org.yaml:snakeyaml:2.0", "pl.pragmatists:JUnitParams:1.1.1", ], repositories = [ diff --git a/src/agent/internals/pom.xml b/src/agent/internals/pom.xml index f72a5ee9..e309342b 100644 --- a/src/agent/internals/pom.xml +++ b/src/agent/internals/pom.xml @@ -36,7 +36,7 @@ org.yaml snakeyaml - 1.32 + 2.0 compile diff --git a/src/agent/internals/src/main/java/com/google/devtools/cdbg/debuglets/java/YamlConfigParser.java b/src/agent/internals/src/main/java/com/google/devtools/cdbg/debuglets/java/YamlConfigParser.java index 6cbef476..90760dd1 100644 --- a/src/agent/internals/src/main/java/com/google/devtools/cdbg/debuglets/java/YamlConfigParser.java +++ b/src/agent/internals/src/main/java/com/google/devtools/cdbg/debuglets/java/YamlConfigParser.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; import org.yaml.snakeyaml.error.YAMLException; @@ -165,7 +166,7 @@ private void addPatternsToSet(Set set, List patterns) * structure. */ private void parseYaml(InputStream yamlConfig) throws YamlConfigParserException { - Yaml yaml = new Yaml(new SafeConstructor()); + Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); Set blocklistPatternSet = new HashSet<>(); Set blocklistExceptionPatternSet = new HashSet<>(); diff --git a/src/codegen/pom.xml b/src/codegen/pom.xml index 651db47e..d897f1a1 100644 --- a/src/codegen/pom.xml +++ b/src/codegen/pom.xml @@ -31,7 +31,7 @@ org.yaml snakeyaml - 1.32 + 2.0 com.google.devtools.cdbg.debuglets.java