Skip to content

Commit 99fb387

Browse files
committed
Java: update ferstl script
1 parent fefe01e commit 99fb387

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

java/ql/integration-tests/update-ferstl-depgraph-dependencies.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ JACKSON_VERSION="${1:-2.18.6}"
3535
GUAVA_VERSION="${2:-33.4.0-jre}"
3636

3737
PLUGIN_UPSTREAM_VERSION="4.0.3"
38-
PLUGIN_CODEQL_VERSION="${PLUGIN_UPSTREAM_VERSION}-CodeQL-2"
38+
PLUGIN_CODEQL_VERSION="${PLUGIN_UPSTREAM_VERSION}-CodeQL-3"
3939
UPSTREAM_TAG="depgraph-maven-plugin-${PLUGIN_UPSTREAM_VERSION}"
4040
UPSTREAM_REPO="https://github.com/ferstl/depgraph-maven-plugin.git"
4141

@@ -76,9 +76,19 @@ pom_path, old_version, new_version, new_guava, new_jackson = sys.argv[1:]
7676
with open(pom_path) as f:
7777
content = f.read()
7878
79-
# 1. Version suffix: 4.0.3 -> 4.0.3-CodeQL-2 (first occurrence only — the <version> element)
79+
# 1. Version suffix: 4.0.3 -> 4.0.3-CodeQL-3 (first occurrence only — the <version> element)
8080
content = content.replace(f'<version>{old_version}</version>', f'<version>{new_version}</version>', 1)
8181
82+
# 1b. Pin patched plexus-utils / commons-lang3 (transitive via maven-core) to
83+
# clear CVEs in the vendored bundle. Inserted into <dependencyManagement>.
84+
content = content.replace(
85+
' <scope>import</scope>\n </dependency>\n </dependencies>\n </dependencyManagement>',
86+
' <scope>import</scope>\n </dependency>\n'
87+
' <dependency>\n <groupId>org.codehaus.plexus</groupId>\n <artifactId>plexus-utils</artifactId>\n <version>3.6.1</version>\n </dependency>\n'
88+
' <dependency>\n <groupId>org.apache.commons</groupId>\n <artifactId>commons-lang3</artifactId>\n <version>3.18.0</version>\n </dependency>\n'
89+
' </dependencies>\n </dependencyManagement>',
90+
1)
91+
8292
# 2. Guava
8393
content = content.replace('<version>31.1-jre</version>', f'<version>{new_guava}</version>')
8494

0 commit comments

Comments
 (0)