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

fix: Upgrade testng to avoid CVE-2022-4065 #18635

Merged
merged 1 commit into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

package org.openapitools.codegen;

import java.nio.file.Files;
import java.util.stream.Collectors;
import io.swagger.v3.oas.models.OpenAPI;
import org.openapitools.codegen.testutils.IntegrationTestPathsConfig;
import org.testng.annotations.Test;
import org.testng.reporters.Files;

import java.io.IOException;
import java.util.HashMap;
Expand Down Expand Up @@ -51,7 +52,7 @@ public void generatesCorrectDirectoryStructure() throws IOException {

IntegrationTestPathsConfig integrationTestPathsConfig = getIntegrationTestPathsConfig();

String specContent = Files.readFile(integrationTestPathsConfig.getSpecPath().toFile());
String specContent = Files.lines(integrationTestPathsConfig.getSpecPath()).collect(Collectors.joining("\n"));
OpenAPI openAPI = TestUtils.parseContent(specContent);


Expand Down
15 changes: 9 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>5</version>
<relativePath/>
<!-- lookup parent from repository -->
<relativePath />
<!-- lookup parent from repository -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
Expand Down Expand Up @@ -505,7 +507,8 @@
<failOnError>false</failOnError>
<!-- https://spotbugs.readthedocs.io/en/stable/effort.html -->
<effort>min</effort>
<excludeFilterFile>${project.basedir}${file.separator}spotbugs-exclude.xml</excludeFilterFile>
<excludeFilterFile>
${project.basedir}${file.separator}spotbugs-exclude.xml</excludeFilterFile>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -1253,10 +1256,10 @@
<spotbugs-plugin.version>3.1.12.2</spotbugs-plugin.version>
<swagger-parser-groupid.version>io.swagger.parser.v3</swagger-parser-groupid.version>
<swagger-parser.version>2.1.22</swagger-parser.version>
<testng.version>7.5</testng.version>
<testng.version>7.10.2</testng.version>
<violations-maven-plugin.version>1.34</violations-maven-plugin.version>
<wagon-ssh-external.version>3.4.3</wagon-ssh-external.version>
<wagon-svn.version>1.12</wagon-svn.version>
<wagon-webdav.version>1.0-beta-2</wagon-webdav.version>
</properties>
</project>
</project>