Skip to content

Commit

Permalink
1.40.x fixing guava python library (#3265)
Browse files Browse the repository at this point in the history
* Fixing guava vulnerability (#3113)

* Fixing guava vulnerability

See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-2976

* Update kogito-build/kogito-dependencies-bom/pom.xml

Co-authored-by: Ricardo Zanini <[email protected]>

---------

Co-authored-by: Ricardo Zanini <[email protected]>

* [KOGITO-9434] Moving python modules under python profile (#3091)

* [KOGITO-9434] Moving python modules under python profile

* [KOGITO-9434] Renaming to full from python

* [KOGITO-9434] Adding activation properties

* [KOGITO-9434] Installing numpy and jep through maven

* [KOGITO-9434] Update executor tests

---------

Co-authored-by: Ricardo Zanini <[email protected]>
  • Loading branch information
fjtirado and ricardozanini authored Oct 26, 2023
1 parent 2e1b430 commit c24af38
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pipeline {
dir(getRepoName()) {
String mvnCmd = getMavenCommand()
.withProperty('maven.test.failure.ignore', true)
.withProfiles(['full'])
.skipTests(params.SKIP_TESTS)
.getFullRunCommand('clean install')
util.runWithPythonVirtualEnv(mvnCmd, 'swf')
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.sonarcloud
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pipeline {
steps {
script {
util.runWithPythonVirtualEnv(getMavenCommand()
.withProfiles(['run-code-coverage'])
.withProfiles(['run-code-coverage', 'full'])
.getFullRunCommand('clean install'),
'swf')
}
Expand Down
7 changes: 7 additions & 0 deletions kogito-build/kogito-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,17 @@
<!-- see: https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html#parallel-test-execution-and-single-thread-execution -->
<version.com.github.stephenc.jcip>1.0-1</version.com.github.stephenc.jcip>
<version.black.ninia>4.1.1</version.black.ninia>
<version.com.google.guava>32.0.1-jre</version.com.google.guava>
</properties>

<dependencyManagement>
<dependencies>
<!-- Guava should not be used directly by Kogito, here we are managing it to override dependency added by GRPC to fix this CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-2976 -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${version.com.google.guava}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,30 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>pip-install</id>
<phase>generate-test-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>pip</executable>
<arguments>
<argument>install</argument>
<argument>-r</argument>
<argument>${project.basedir}/requirements.txt</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy>=1.21.0
jep>=4.1.1
14 changes: 12 additions & 2 deletions kogito-serverless-workflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,21 @@
</property>
</activation>
<modules>
<module>kogito-serverless-workflow-python-runtime</module>
<module>kogito-serverless-workflow-executor</module>
<module>kogito-serverless-workflow-executor-python</module>
<module>kogito-serverless-workflow-executor-tests</module>
</modules>
</profile>
<profile>
<id>full</id>
<activation>
<property>
<name>full</name>
</property>
</activation>
<modules>
<module>kogito-serverless-workflow-python-runtime</module>
<module>kogito-serverless-workflow-executor-python</module>
</modules>
</profile>
</profiles>
</project>
11 changes: 11 additions & 0 deletions quarkus/addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@
<module>python</module>
</modules>
</profile>
<profile>
<id>full</id>
<activation>
<property>
<name>full</name>
</property>
</activation>
<modules>
<module>python</module>
</modules>
</profile>
</profiles>

<build>
Expand Down
21 changes: 21 additions & 0 deletions quarkus/addons/python/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>pip-install</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>pip</executable>
<arguments>
<argument>install</argument>
<argument>-r</argument>
<argument>${project.basedir}/requirements.txt</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 2 additions & 0 deletions quarkus/addons/python/integration-tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy>=1.21.0
jep>=4.1.1

0 comments on commit c24af38

Please sign in to comment.