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

[Snyk] Security upgrade org.springframework.boot:spring-boot-starter-tomcat from 2.7.18 to 3.2.7 #23

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4743d31
refactor(project): Remove liferay frontend
heliocastro Apr 29, 2024
86bbd27
refactor(java): Move to Java 17
heliocastro Apr 29, 2024
0e69da3
refactor(project): Adjust dependencies for Java 17 and Liferay removal
heliocastro Apr 29, 2024
425da38
refactor(project): Remove flatten maven plugin
heliocastro Apr 29, 2024
6839d36
refactor(project): Remove log4j-osgi-support
heliocastro Apr 29, 2024
819c2c5
refactor(project): Remove liferay properties
heliocastro Apr 29, 2024
0ed5a12
refactor(project): Remove unused Jenkins build files
heliocastro Apr 29, 2024
8d02ed2
refactor(datahandler): Update for modern thrift and Java 17
heliocastro Apr 29, 2024
5e046ea
fix(deps): Remove duplicate json dependency version
heliocastro May 14, 2024
7e5c60e
refactor(thirdparty): Remove old couchdb-lucene
heliocastro May 14, 2024
876945b
refactor(scripts): Set default to newer Thrift
heliocastro May 14, 2024
aff9aff
refactor(project): Move enforcer plugin to proper location
heliocastro May 14, 2024
c073cd6
refactor(linter): Remove spotless as not used
heliocastro May 14, 2024
bb385fa
refactor(project): Remove jacoco maven plugin
heliocastro May 14, 2024
c626191
refactor(project): Remove unused buildnumber maven plugin
heliocastro May 14, 2024
1e1bc29
refactor(project): Remove unused versions maven plugin
heliocastro May 14, 2024
681ab69
refactor(frontend): Remove frontend references
heliocastro May 14, 2024
f0ee317
refactor(libraries): Remove OSGI bundle from CommonIO
heliocastro May 14, 2024
3d54efb
refactor(libraries): Remove OSGI bundle from exporters
heliocastro May 14, 2024
9979a85
refactor(libraries): Remove OSGI bundle from importers
heliocastro May 14, 2024
3083c2d
refactor(project): Remove OSGI bundle plugin
heliocastro May 14, 2024
3e69647
refactor(project): Start transition to Jakarta API
heliocastro May 14, 2024
9e13651
refactor(project): Add maven-git-versioning extension
heliocastro May 14, 2024
4b891be
refactor(docker): Initial docker refactor with Tomcat only
heliocastro May 14, 2024
4f79c63
chore(vscode): Improve Java buildsystem handling
heliocastro May 14, 2024
8d32e8f
refactor(rest): Make old authorization-server compile
heliocastro May 30, 2024
6010914
refactor(workflows): Build new codebase
heliocastro May 30, 2024
c80ddfc
feat(docker): Add couchdb-test properties
heliocastro May 30, 2024
d8cabf8
refactor(project): Remove pontual build references on Liferay
heliocastro May 30, 2024
fa9c857
refactor(readme): Remove some liferay references
heliocastro May 30, 2024
b523c6e
build(deps): bump org.apache.commons:commons-compress
dependabot[bot] May 15, 2024
330c1be
feat(workflow): Upload test results in case of failure
heliocastro May 30, 2024
88b0c05
fix(tests): Make partial importer tests pass
heliocastro May 31, 2024
4e2377f
refactor(project): Disable client library temporary
heliocastro May 31, 2024
d168113
refactor(couchdb): Remove old lucene patch
heliocastro May 31, 2024
21e31e5
refactor(docker): Enable new codebase
heliocastro May 31, 2024
5c272bb
fix(tests): Fix codebase to match springboot series 2.x
heliocastro Jun 2, 2024
9012a62
fix(project): Normalize version and deploy properties
heliocastro Jun 2, 2024
c1c5307
fix(project): Adjust version to match maven requirements
heliocastro Jun 2, 2024
30851ec
fix(project): Adjust to use properties in main pom.xml
heliocastro Jun 2, 2024
01ecf1f
fix(tests): Update to Java 17 compatible libraries
heliocastro Jun 2, 2024
7f3241a
fix(tests): Temporary disable client tests
heliocastro Jun 2, 2024
30b714f
chore(project): Ignore/exclude git-versioned
heliocastro Jun 2, 2024
eb004a2
fix: pom.xml to reduce vulnerabilities
snyk-bot Jul 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
63 changes: 34 additions & 29 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:

- name: Set environment variables
run: |
echo _JAVA_OPTIONS= '-Djdk.util.zip.disableZip64ExtraFieldValidation=true' >> $GITHUB_ENV
cat .versions >> $GITHUB_ENV

- name: Setup CouchDB
Expand All @@ -62,10 +61,10 @@ jobs:
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq python3-pip build-essential libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config libssl-dev git cmake
pip install mkdocs mkdocs-material

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
check-latest: true
cache: 'maven'
Expand All @@ -75,11 +74,9 @@ jobs:
uses: actions/cache@v4
with:
path: |
/usr/local/bin/thrift
/usr/local/bin
/usr/share/thrift/${{ env.THRIFT_VERSION }}
key: ${{ runner.os }}-thrift-${{ env.THRIFT_VERSION }}
restore-keys: |
${{ runner.os }}-thrift-${{ env.THRIFT_VERSION }}

- name: Install Thrift
if: steps.cache-thrift.outputs.cache-hit != 'true'
Expand All @@ -88,33 +85,41 @@ jobs:
bash scripts/install-thrift.sh

- name: Build SW360
id: build
run: |
mvn clean install --no-transfer-progress -P deploy -Dhelp-docs=true -Dbase.deploy.dir=. -Dliferay.deploy.dir=${PWD}/deploy -Dbackend.deploy.dir=${PWD}/deploy/webapps -Drest.deploy.dir=${PWD}/deploy/webapps -DRunComponentVisibilityRestrictionTest=false -DRunPrivateProjectAccessTest=false -DRunRestForceUpdateTest=false
mvn clean install --no-transfer-progress -P deploy -Dhelp-docs=true -Dbase.deploy.dir=${{ github.workspace }} -Dbackend.deploy.dir=${PWD}/deploy/webapps -Drest.deploy.dir=${PWD}/deploy/webapps -DRunComponentVisibilityRestrictionTest=false -DRunPrivateProjectAccessTest=false -DRunRestForceUpdateTest=false -Dmaven.plugin.validation=VERBOSE

- name: Run PrivateProjectAccessTest
run: |
cd build-configuration
mvn install
cd ..
cd libraries/datahandler
mvn test -Dtest=ProjectPermissionsVisibilityTest -DRunPrivateProjectAccessTest=true -DRunRestForceUpdateTest=true
cd ../..
cd ${{ github.workspace }}/libraries/datahandler
mvn test -Dbase.deploy.dir=${{ github.workspace }} -Dtest=ProjectPermissionsVisibilityTest -DRunPrivateProjectAccessTest=true -DRunRestForceUpdateTest=true

- name: Run BulkReleaseDeletingTest
run: |
cd backend/src/src-components
mvn test -Dtest=BulkDeleteUtilTest -DRunPrivateProjectAccessTest=true -DRunBulkReleaseDeletingTest=true

- name: Deploy Backend and Rest Server
run: |
sudo docker build -t sw360backendrest -f sw360BackendRest.Dockerfile .
sudo docker run -dt --network=host sw360backendrest
bash scripts/sw360BackendRestDockerConfig/scripts/checkDeploymentIsSuccess.sh

- name: Create users and oauth client
run: bash scripts/sw360BackendRestDockerConfig/scripts/createUserAndOauthClient.sh

- name: Run Client Integration Test for Rest Api
run: |
cd clients
mvn clean install --no-transfer-progress -DRunRestIntegrationTest=true
cd ${{ github.workspace }}/backend/src/src-components
mvn test -Dbase.deploy.dir=${{ github.workspace }} -Dtest=BulkDeleteUtilTest -DRunPrivateProjectAccessTest=true -DRunBulkReleaseDeletingTest=true

# - name: Deploy Backend and Rest Server
# shell: bash
# run: |
# cd ${{ github.workspace }}
# sudo docker build -t sw360backendrest -f scripts/sw360BackendRest.Dockerfile .
# sudo docker run -dt --network=host sw360backendrest
# scripts/sw360BackendRestDockerConfig/scripts/checkDeploymentIsSuccess.sh

# - name: Create users and oauth client
# shell: bash
# run: |
# scripts/sw360BackendRestDockerConfig/scripts/createUserAndOauthClient.sh

# - name: Run Client Integration Test for Rest Api
# run: |
# cd ${{ github.workspace }}/clients
# mvn clean install -Dbase.deploy.dir=${{ github.workspace }} --no-transfer-progress -DRunRestIntegrationTest=true

# - name: Upload test reports
# if: failure()
# uses: actions/upload-artifact@v4
# with:
# name: test-reports
# path: ${{ github.workspace }}/libraries/importers/target/surefire-reports
34 changes: 4 additions & 30 deletions .github/workflows/docker_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,43 +45,17 @@ jobs:
- name: Checkout main repository
uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
cache: 'maven'
distribution: 'temurin'

- name: Get revision from pom.xml
id: pom_version
run: |
echo "SW360_VERSION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout)" >> "$GITHUB_OUTPUT"
base_image:
name: SW360 Base image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout default branch
uses: actions/checkout@v4
- name: Set environment variables
run: |
cat .versions >> $GITHUB_ENV
- name: Build base image
uses: heliocastro/docker-build-control@v1
with:
name: base
token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.JAVA_VERSION }}-jdk-${{ env.UBUNTU_VERSION }}
invalidate-cache: ${{ inputs.invalidate-cache }}
debug: ${{ inputs.debug }}
build-args: |
LIFERAY_VERSION=${{ env.LIFERAY_VERSION }}
LIFERAY_SOURCE=${{ env.LIFERAY_SOURCE }}
JAVA_VERSION=${{ env.JAVA_VERSION }}
UBUNTU_VERSION=${{ env.UBUNTU_VERSION }}

thrift_image:
name: Build SW360 Thrift image
Expand Down Expand Up @@ -110,7 +84,7 @@ jobs:

binary_image:
name: SW360 Binary
needs: [sw360_version, base_image, thrift_image]
needs: [sw360_version, thrift_image]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -142,7 +116,7 @@ jobs:

runtime_image:
name: SW360 Runtime image
needs: [sw360_version, base_image, binary_image]
needs: [sw360_version, binary_image]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jgiven-reports/
.settings
.factorypath

# Ignore VSCode files
.vscode/
#*.code-workspace

# Ignore backup files
*.bak
*.orig
Expand Down Expand Up @@ -67,3 +63,9 @@ tmp/**/*

# DS_Store
.DS_Store

# Git versioned
.git-versioned-pom.xml

# Python local pyenv
.python-version
22 changes: 22 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024. Helio Chissini de Castro.
~
~ This program and the accompanying materials are made
~ available under the terms of the Eclipse Public License 2.0
~ which is available at https://www.eclipse.org/legal/epl-2.0/
~
~ SPDX-License-Identifier: EPL-2.0
-->

<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">

<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.6.6</version>
</extension>

</extensions>
33 changes: 33 additions & 0 deletions .mvn/maven-git-versioning-extension.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2024. Helio Chissini de Castro.
~
~ This program and the accompanying materials are made
~ available under the terms of the Eclipse Public License 2.0
~ which is available at https://www.eclipse.org/legal/epl-2.0/
~
~ SPDX-License-Identifier: EPL-2.0
-->

<configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-9.4.0.xsd">

<refs>
<ref type="branch">
<pattern>.+</pattern>
<version>${version}-SNAPSHOT</version>
</ref>

<ref type="tag">
<pattern><![CDATA[v(?<version>.*)]]></pattern>
<version>${ref.version}</version>
</ref>
</refs>

<!-- optional fallback configuration in case of no matching ref configuration-->
<rev>
<version>${commit}</version>
</rev>

</configuration>
12 changes: 2 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.6.0
hooks:
- id: check-merge-conflict
# - id: end-of-file-fixer
# - id: trailing-whitespace

- repo: https://github.com/compilerla/conventional-pre-commit
rev: 'v2.1.1'
rev: 'v3.2.0'
hooks:
- id: conventional-pre-commit
stages: [commit-msg]

- repo: https://github.com/ejba/pre-commit-maven
rev: v0.3.3
hooks:
- id: maven-spotless-apply
stages: [manual]
always_run: false
9 changes: 4 additions & 5 deletions .versions
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
THRIFT_VERSION=0.18.1
LIFERAY_VERSION=7.4.3.18-ga18
LIFERAY_SOURCE=liferay-ce-portal-tomcat-7.4.3.18-ga18-20220329092001364.tar.gz
UBUNTU_VERSION=jammy
JAVA_VERSION=11
THRIFT_VERSION=0.20.0
TOMCAT_VERSION=10-jre17-temurin-jammy
JAVA_VERSION=17
SW360_VERSION=18.99.0
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.exclude": {
"**/.git-versioned-pom.xml": true
}
}
Loading