diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..2257e2d
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,45 @@
+version: 2
+updates:
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "monthly"
+ groups:
+ java-test-dependencies:
+ patterns:
+ - "org.junit.jupiter:*"
+ - "org.mockito:*"
+ - "org.hamcrest:*"
+ - "org.openjdk.jmh:*"
+ maven-build-plugins:
+ patterns:
+ - "org.apache.maven.plugins:*"
+ - "org.codehaus.mojo:exec-maven-plugin"
+ - "org.jacoco:jacoco-maven-plugin"
+ - "org.owasp:dependency-check-maven"
+ - "org.sonatype.plugins:nexus-staging-maven-plugin"
+ java-production-dependencies:
+ patterns:
+ - "*"
+ exclude-patterns:
+ - "org.junit.jupiter:*"
+ - "org.mockito:*"
+ - "org.hamcrest:*"
+ - "org.openjdk.jmh:*"
+ - "org.apache.maven.plugins:*"
+ - "org.codehaus.mojo:exec-maven-plugin"
+ - "org.jacoco:jacoco-maven-plugin"
+ - "org.owasp:dependency-check-maven"
+ - "org.sonatype.plugins:nexus-staging-maven-plugin"
+
+
+ - package-ecosystem: "github-actions"
+ directory: "/" # even for `.github/workflows`
+ schedule:
+ interval: "monthly"
+ groups:
+ github-actions:
+ patterns:
+ - "*"
+ labels:
+ - "ci"
\ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2c4e4a0..dff3a25 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,18 +5,17 @@ jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
- if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- - uses: actions/setup-java@v3
+ - uses: actions/setup-java@v4
with:
- java-version: 11
+ java-version: 22
distribution: 'temurin'
cache: 'maven'
- name: Cache SonarCloud packages
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
@@ -30,23 +29,21 @@ jobs:
mvn -B verify
jacoco:report
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- -Pcoverage,dependency-check
+ -Pcoverage
-Dsonar.projectKey=cryptomator_cryptolib
-Dsonar.organization=cryptomator
-Dsonar.host.url=https://sonarcloud.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
with:
name: artifacts
path: target/*.jar
- name: Create Release
- uses: actions/create-release@v1 # NOTE: action is unmaintained and repo archived
+ uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
- env:
- GITHUB_TOKEN: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} # release as "cryptobot"
with:
- tag_name: ${{ github.ref }}
- release_name: Release ${{ github.ref }}
- prerelease: true
\ No newline at end of file
+ prerelease: true
+ token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }}
+ generate_release_notes: true
\ No newline at end of file
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 223b46a..c687448 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -13,21 +13,20 @@ jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
- if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 2
- - uses: actions/setup-java@v3
+ - uses: actions/setup-java@v4
with:
- java-version: 11
+ java-version: 22
distribution: 'temurin'
cache: 'maven'
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: java
- name: Build and Test
run: mvn -B install -DskipTests
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
\ No newline at end of file
+ uses: github/codeql-action/analyze@v3
\ No newline at end of file
diff --git a/.github/workflows/dependency-check.yml b/.github/workflows/dependency-check.yml
new file mode 100644
index 0000000..31dd104
--- /dev/null
+++ b/.github/workflows/dependency-check.yml
@@ -0,0 +1,20 @@
+name: OWASP Maven Dependency Check
+on:
+ schedule:
+ - cron: '0 12 * * 0'
+ push:
+ branches:
+ - 'release/**'
+ workflow_dispatch:
+
+
+jobs:
+ check-dependencies:
+ uses: skymatic/workflows/.github/workflows/run-dependency-check.yml@v1
+ with:
+ runner-os: 'ubuntu-latest'
+ java-distribution: 'temurin'
+ java-version: 22
+ secrets:
+ nvd-api-key: ${{ secrets.NVD_API_KEY }}
+ slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
diff --git a/.github/workflows/publish-central.yml b/.github/workflows/publish-central.yml
index 526cc8d..f075bc2 100644
--- a/.github/workflows/publish-central.yml
+++ b/.github/workflows/publish-central.yml
@@ -10,12 +10,12 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
ref: "refs/tags/${{ github.event.inputs.tag }}"
- - uses: actions/setup-java@v3
+ - uses: actions/setup-java@v4
with:
- java-version: 11
+ java-version: 22
distribution: 'temurin'
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
@@ -24,10 +24,11 @@ jobs:
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Enforce project version ${{ github.event.inputs.tag }}
- run: mvn versions:set -B -DnewVersion=${{ github.event.inputs.tag }}
+ run: mvn versions:set -B -DnewVersion=$GIT_TAG
- name: Deploy
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
env:
+ GIT_TAG: ${{ github.event.inputs.tag }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
\ No newline at end of file
diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml
index d195008..b590555 100644
--- a/.github/workflows/publish-github.yml
+++ b/.github/workflows/publish-github.yml
@@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-java@v3
+ - uses: actions/checkout@v4
+ - uses: actions/setup-java@v4
with:
- java-version: 11
+ java-version: 22
distribution: 'temurin'
cache: 'maven'
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 4d8efc6..a6632ff 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,5 +1,6 @@
+
-
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a1bd32d..a4080bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
org.cryptomator
cryptolib
- 2.1.2
+ 2.2.0
Cryptomator Crypto Library
This library contains all cryptographic functions that are used by Cryptomator.
https://github.com/cryptomator/cryptolib
@@ -18,22 +18,22 @@
8
- 2.8.9
- 31.0.1-jre
- 1.4.4
- 1.70
- 1.7.35
+ 2.10.1
+ 33.1.0-jre
+ 1.5.2
+ 1.78.1
+ 2.0.13
- 5.8.2
- 4.3.1
+ 5.10.2
+ 5.11.0
2.2
- 1.34
+ 1.37
- 6.5.3
- 0.8.7
- 1.6.8
+ 9.1.0
+ 0.8.12
+ 1.6.13
@@ -63,7 +63,7 @@
org.bouncycastle
- bcpkix-jdk15on
+ bcpkix-jdk18on
${bouncycastle.version}
true
@@ -131,7 +131,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.0.0
+ 3.4.1
enforce-java
@@ -141,8 +141,8 @@
- You need at least JDK 11.0.3 to build this project.
- [11.0.3,)
+ You need at least JDK 22 to build this project.
+ [22,)
@@ -151,7 +151,7 @@
maven-compiler-plugin
- 3.9.0
+ 3.13.0
UTF-8
true
@@ -171,11 +171,25 @@
true
+
+ java22
+ compile
+
+ compile
+
+
+ 22
+
+ ${project.basedir}/src/main/java22
+
+ true
+
+
maven-shade-plugin
- 3.4.0
+ 3.5.3
package
@@ -213,7 +227,7 @@
org.codehaus.mojo
exec-maven-plugin
- 3.1.0
+ 3.2.0
package
@@ -228,6 +242,7 @@
--update
--file=${project.build.directory}/${project.build.finalName}.jar
META-INF/versions/9/module-info.class
+ META-INF/versions/22/module-info.class
@@ -236,12 +251,12 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0-M5
+ 3.2.5
org.apache.maven.plugins
maven-jar-plugin
- 3.2.2
+ 3.4.1
@@ -253,7 +268,7 @@
maven-source-plugin
- 3.2.1
+ 3.3.1
attach-sources
@@ -265,7 +280,7 @@
maven-javadoc-plugin
- 3.3.1
+ 3.6.3
attach-javadocs
@@ -317,17 +332,19 @@
dependency-check-maven
${dependency-check.version}
- 24
+ 24
0
true
true
suppression.xml
+ ${env.NVD_API_KEY}
check
+ validate
@@ -368,7 +385,7 @@
maven-gpg-plugin
- 3.0.1
+ 3.2.4
sign-artifacts
diff --git a/src/main/java22/module-info.java b/src/main/java22/module-info.java
new file mode 100644
index 0000000..06e5d6a
--- /dev/null
+++ b/src/main/java22/module-info.java
@@ -0,0 +1,27 @@
+import org.cryptomator.cryptolib.api.CryptorProvider;
+
+/**
+ * This module provides the highlevel cryptographic API used by Cryptomator.
+ *
+ * @uses CryptorProvider See {@link CryptorProvider#forScheme(CryptorProvider.Scheme)}
+ * @provides CryptorProvider Providers for {@link org.cryptomator.cryptolib.api.CryptorProvider.Scheme#SIV_CTRMAC SIV/CTR-then-MAC}
+ * and {@link org.cryptomator.cryptolib.api.CryptorProvider.Scheme#SIV_GCM SIV/GCM}
+ */
+module org.cryptomator.cryptolib {
+ requires static org.bouncycastle.provider; // will be shaded
+ requires static org.bouncycastle.pkix; // will be shaded
+ requires org.cryptomator.siv;
+ requires com.google.gson;
+ requires transitive com.google.common;
+ requires org.slf4j;
+
+ exports org.cryptomator.cryptolib.api;
+ exports org.cryptomator.cryptolib.common;
+
+ opens org.cryptomator.cryptolib.common to com.google.gson;
+
+ uses CryptorProvider;
+
+ provides CryptorProvider
+ with org.cryptomator.cryptolib.v1.CryptorProviderImpl, org.cryptomator.cryptolib.v2.CryptorProviderImpl;
+}
\ No newline at end of file
diff --git a/suppression.xml b/suppression.xml
index b4e9da1..a831953 100644
--- a/suppression.xml
+++ b/suppression.xml
@@ -3,8 +3,9 @@
+ Incorrectly matched CPE
+ ]]>
+
org\.cryptomator:.*
cpe:/a:cryptomator:cryptomator
CVE-2022-25366
@@ -12,10 +13,11 @@
+ Suppress false positive, because com.google.common.io.Files.getTempDir() is not used
+ ]]>
+
^pkg:maven/com\.google\.guava/guava@.*$
CVE-2020-8908
CVE-2020-8908
-
\ No newline at end of file
+