Skip to content

Commit fda54ff

Browse files
fix: Maven plugins and vulnerability fix (#32)
vulnerability fix GHSA-pfh2-hfmq-phg5, Score: 5.3 Included Maven plugins for generating source JARs, Javadoc JARs, and checksum files across multiple project POMs. Also added a new protobuf Java dependency and updated project URLs in the main POM. These changes enhance build reproducibility and artifact verification.
1 parent 38f207d commit fda54ff

File tree

5 files changed

+260
-1
lines changed

5 files changed

+260
-1
lines changed

nifi-tdf-controller-services-api-nar/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,66 @@
5252
<groupId>org.apache.nifi</groupId>
5353
<artifactId>nifi-nar-maven-plugin</artifactId>
5454
</plugin>
55+
<!-- Plugin to create source JAR -->
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-source-plugin</artifactId>
59+
<version>3.3.1</version>
60+
<executions>
61+
<execution>
62+
<id>attach-sources</id>
63+
<goals>
64+
<goal>jar</goal>
65+
</goals>
66+
</execution>
67+
</executions>
68+
</plugin>
69+
<!-- Plugin to create Javadoc JAR -->
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-javadoc-plugin</artifactId>
73+
<version>3.8.0</version>
74+
<executions>
75+
<execution>
76+
<id>attach-javadocs</id>
77+
<goals>
78+
<goal>jar</goal>
79+
</goals>
80+
</execution>
81+
</executions>
82+
</plugin>
83+
<!-- Plugin to generate checksum files -->
84+
<plugin>
85+
<groupId>net.nicoulaj.maven.plugins</groupId>
86+
<artifactId>checksum-maven-plugin</artifactId>
87+
<version>1.11</version>
88+
<executions>
89+
<execution>
90+
<id>create-checksums</id>
91+
<phase>package</phase>
92+
<goals>
93+
<goal>files</goal>
94+
</goals>
95+
<configuration>
96+
<algorithms>
97+
<algorithm>MD5</algorithm>
98+
<algorithm>SHA-1</algorithm>
99+
<algorithm>SHA-256</algorithm>
100+
<algorithm>SHA-512</algorithm>
101+
</algorithms>
102+
<failOnError>true</failOnError>
103+
<fileSets>
104+
<fileSet>
105+
<directory>${project.build.directory}</directory>
106+
<includes>
107+
<include>*.nar</include>
108+
</includes>
109+
</fileSet>
110+
</fileSets>
111+
</configuration>
112+
</execution>
113+
</executions>
114+
</plugin>
55115
</plugins>
56116
</build>
57117
</project>

nifi-tdf-controller-services-api/pom.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,68 @@
3131
<version>${nifi.version}</version>
3232
</dependency>
3333
</dependencies>
34+
<build>
35+
<plugins>
36+
<!-- Plugin to create source JAR -->
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-source-plugin</artifactId>
40+
<version>3.3.1</version>
41+
<executions>
42+
<execution>
43+
<id>attach-sources</id>
44+
<goals>
45+
<goal>jar</goal>
46+
</goals>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
<!-- Plugin to create Javadoc JAR -->
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-javadoc-plugin</artifactId>
54+
<version>3.8.0</version>
55+
<executions>
56+
<execution>
57+
<id>attach-javadocs</id>
58+
<goals>
59+
<goal>jar</goal>
60+
</goals>
61+
</execution>
62+
</executions>
63+
</plugin>
64+
<!-- Plugin to generate checksum files -->
65+
<plugin>
66+
<groupId>net.nicoulaj.maven.plugins</groupId>
67+
<artifactId>checksum-maven-plugin</artifactId>
68+
<version>1.11</version>
69+
<executions>
70+
<execution>
71+
<id>create-checksums</id>
72+
<phase>package</phase>
73+
<goals>
74+
<goal>files</goal>
75+
</goals>
76+
<configuration>
77+
<algorithms>
78+
<algorithm>MD5</algorithm>
79+
<algorithm>SHA-1</algorithm>
80+
<algorithm>SHA-256</algorithm>
81+
<algorithm>SHA-512</algorithm>
82+
</algorithms>
83+
<failOnError>true</failOnError>
84+
<fileSets>
85+
<fileSet>
86+
<directory>${project.build.directory}</directory>
87+
<includes>
88+
<include>*.jar</include>
89+
</includes>
90+
</fileSet>
91+
</fileSets>
92+
</configuration>
93+
</execution>
94+
</executions>
95+
</plugin>
96+
</plugins>
97+
</build>
3498
</project>

nifi-tdf-nar/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,66 @@
3333
<groupId>org.apache.nifi</groupId>
3434
<artifactId>nifi-nar-maven-plugin</artifactId>
3535
</plugin>
36+
<!-- Plugin to create source JAR -->
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-source-plugin</artifactId>
40+
<version>3.3.1</version>
41+
<executions>
42+
<execution>
43+
<id>attach-sources</id>
44+
<goals>
45+
<goal>jar</goal>
46+
</goals>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
<!-- Plugin to create Javadoc JAR -->
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-javadoc-plugin</artifactId>
54+
<version>3.8.0</version>
55+
<executions>
56+
<execution>
57+
<id>attach-javadocs</id>
58+
<goals>
59+
<goal>jar</goal>
60+
</goals>
61+
</execution>
62+
</executions>
63+
</plugin>
64+
<!-- Plugin to generate checksum files -->
65+
<plugin>
66+
<groupId>net.nicoulaj.maven.plugins</groupId>
67+
<artifactId>checksum-maven-plugin</artifactId>
68+
<version>1.11</version>
69+
<executions>
70+
<execution>
71+
<id>create-checksums</id>
72+
<phase>package</phase>
73+
<goals>
74+
<goal>files</goal>
75+
</goals>
76+
<configuration>
77+
<algorithms>
78+
<algorithm>MD5</algorithm>
79+
<algorithm>SHA-1</algorithm>
80+
<algorithm>SHA-256</algorithm>
81+
<algorithm>SHA-512</algorithm>
82+
</algorithms>
83+
<failOnError>true</failOnError>
84+
<fileSets>
85+
<fileSet>
86+
<directory>${project.build.directory}</directory>
87+
<includes>
88+
<include>*.nar</include>
89+
</includes>
90+
</fileSet>
91+
</fileSets>
92+
</configuration>
93+
</execution>
94+
</executions>
95+
</plugin>
3696
<plugin>
3797
<groupId>org.jacoco</groupId>
3898
<artifactId>jacoco-maven-plugin</artifactId>

nifi-tdf-processors/pom.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,68 @@
9797
<scope>test</scope>
9898
</dependency>
9999
</dependencies>
100+
<build>
101+
<plugins>
102+
<!-- Plugin to create source JAR -->
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-source-plugin</artifactId>
106+
<version>3.3.1</version>
107+
<executions>
108+
<execution>
109+
<id>attach-sources</id>
110+
<goals>
111+
<goal>jar</goal>
112+
</goals>
113+
</execution>
114+
</executions>
115+
</plugin>
116+
<!-- Plugin to create Javadoc JAR -->
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-javadoc-plugin</artifactId>
120+
<version>3.8.0</version>
121+
<executions>
122+
<execution>
123+
<id>attach-javadocs</id>
124+
<goals>
125+
<goal>jar</goal>
126+
</goals>
127+
</execution>
128+
</executions>
129+
</plugin>
130+
<!-- Plugin to generate checksum files -->
131+
<plugin>
132+
<groupId>net.nicoulaj.maven.plugins</groupId>
133+
<artifactId>checksum-maven-plugin</artifactId>
134+
<version>1.11</version>
135+
<executions>
136+
<execution>
137+
<id>create-checksums</id>
138+
<phase>package</phase>
139+
<goals>
140+
<goal>files</goal>
141+
</goals>
142+
<configuration>
143+
<algorithms>
144+
<algorithm>MD5</algorithm>
145+
<algorithm>SHA-1</algorithm>
146+
<algorithm>SHA-256</algorithm>
147+
<algorithm>SHA-512</algorithm>
148+
</algorithms>
149+
<failOnError>true</failOnError>
150+
<fileSets>
151+
<fileSet>
152+
<directory>${project.build.directory}</directory>
153+
<includes>
154+
<include>*.jar</include>
155+
</includes>
156+
</fileSet>
157+
</fileSets>
158+
</configuration>
159+
</execution>
160+
</executions>
161+
</plugin>
162+
</plugins>
163+
</build>
100164
</project>

pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
<artifactId>nifi-pom</artifactId>
99
<version>0.6.0-SNAPSHOT</version><!-- {x-version-update:nifi:current} -->
1010
<name>nifi-pom</name>
11-
<packaging>pom</packaging>
1211
<description>NiFi processors for OpenTDF</description>
12+
<url>https://github.com/opentdf/nifi</url>
13+
<packaging>pom</packaging>
1314
<licenses>
1415
<license>
1516
<name>Clear BSD License</name>
@@ -90,6 +91,16 @@
9091
<version>5.2.0</version>
9192
<scope>test</scope>
9293
</dependency>
94+
<dependency>
95+
<groupId>com.google.protobuf</groupId>
96+
<artifactId>protobuf-java</artifactId>
97+
<version>3.25.5</version>
98+
</dependency>
99+
<dependency>
100+
<groupId>com.jayway.jsonpath</groupId>
101+
<artifactId>json-path</artifactId>
102+
<version>2.9.0</version>
103+
</dependency>
93104
</dependencies>
94105
</dependencyManagement>
95106
<build>

0 commit comments

Comments
 (0)