Skip to content

Commit 98ffe4a

Browse files
Merge branch 'release/1.1.0'
2 parents 870f25a + 6c60793 commit 98ffe4a

File tree

9 files changed

+102
-56
lines changed

9 files changed

+102
-56
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,19 @@ jobs:
88
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: actions/setup-java@v1
11+
- uses: actions/setup-java@v2
1212
with:
13-
java-version: 11
14-
- uses: actions/cache@v2
15-
with:
16-
path: ~/.m2/repository
17-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
18-
restore-keys: |
19-
${{ runner.os }}-maven-
13+
distribution: 'temurin'
14+
java-version: 17
15+
cache: 'maven'
2016
- name: Ensure to use tagged version
2117
if: startsWith(github.ref, 'refs/tags/')
2218
shell: bash
2319
run: |
2420
mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
2521
- name: Build and Test
2622
id: buildAndTest
27-
run: mvn -B clean install
23+
run: mvn -B clean install -Pdependency-check
2824
- uses: actions/upload-artifact@v2
2925
with:
3026
name: artifacts

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ jobs:
1818
- uses: actions/checkout@v2
1919
with:
2020
fetch-depth: 2
21-
- uses: actions/setup-java@v1
21+
- uses: actions/setup-java@v2
2222
with:
23-
java-version: 11
24-
- uses: actions/cache@v2
25-
with:
26-
path: ~/.m2/repository
27-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: |
29-
${{ runner.os }}-maven-
23+
distribution: 'temurin'
24+
java-version: 17
25+
cache: 'maven'
3026
- name: Initialize CodeQL
3127
uses: github/codeql-action/init@v1
3228
with:

.github/workflows/publish-central.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@ jobs:
1313
- uses: actions/checkout@v2
1414
with:
1515
ref: "refs/tags/${{ github.event.inputs.tag }}"
16-
- uses: actions/setup-java@v1
16+
- uses: actions/setup-java@v2
1717
with:
18-
java-version: 11
18+
distribution: 'temurin'
19+
java-version: 17
20+
cache: 'maven'
1921
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
2022
server-username: MAVEN_USERNAME # env variable for username in deploy
2123
server-password: MAVEN_PASSWORD # env variable for token in deploy
2224
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
2325
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
24-
- uses: actions/cache@v2
25-
with:
26-
path: ~/.m2/repository
27-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
28-
restore-keys: |
29-
${{ runner.os }}-maven-
3026
- name: Enforce project version ${{ github.event.inputs.tag }}
3127
run: mvn versions:set -B -DnewVersion=${{ github.event.inputs.tag }}
3228
- name: Deploy
3329
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
3430
env:
31+
MAVEN_OPTS: >
32+
--add-opens=java.base/java.util=ALL-UNNAMED
33+
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
34+
--add-opens=java.base/java.text=ALL-UNNAMED
35+
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
3536
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3637
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
3738
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}

.github/workflows/publish-github.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ jobs:
88
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: actions/setup-java@v1
11+
- uses: actions/setup-java@v2
1212
with:
13-
java-version: 11
13+
distribution: 'temurin'
14+
java-version: 17
15+
cache: 'maven'
1416
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
1517
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
16-
- uses: actions/cache@v2
17-
with:
18-
path: ~/.m2/repository
19-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
20-
restore-keys: |
21-
${{ runner.os }}-maven-
2218
- name: Enforce project version ${{ github.event.release.tag_name }}
2319
run: mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }}
2420
- name: Deploy

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>org.cryptomator</groupId>
77
<artifactId>integrations-linux</artifactId>
8-
<version>1.0.1</version>
8+
<version>1.1.0</version>
99

1010
<name>integrations-linux</name>
1111
<description>Provides optional Linux services used by Cryptomator</description>
@@ -36,16 +36,21 @@
3636

3737
<properties>
3838
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39+
<project.jdk.version>17</project.jdk.version>
3940

4041
<!-- runtime dependencies -->
41-
<api.version>1.0.0</api.version>
42+
<api.version>1.1.0</api.version>
4243
<secret-service.version>1.7.0</secret-service.version>
43-
<kdewallet.version>1.2.3</kdewallet.version>
44-
<guava.version>31.0-jre</guava.version>
45-
<slf4j.version>1.7.32</slf4j.version>
44+
<kdewallet.version>1.2.6</kdewallet.version>
45+
<guava.version>31.1-jre</guava.version>
46+
<slf4j.version>1.7.36</slf4j.version>
4647

4748
<!-- test dependencies -->
48-
<junit.version>5.8.1</junit.version>
49+
<junit.version>5.8.2</junit.version>
50+
51+
<!-- build plugin dependencies -->
52+
<dependency-check.version>7.0.0</dependency-check.version>
53+
<nexus-staging.version>1.6.8</nexus-staging.version>
4954
</properties>
5055

5156
<dependencies>
@@ -83,14 +88,13 @@
8388
</dependencies>
8489

8590
<build>
86-
8791
<plugins>
8892
<plugin>
8993
<groupId>org.apache.maven.plugins</groupId>
9094
<artifactId>maven-compiler-plugin</artifactId>
91-
<version>3.8.1</version>
95+
<version>3.9.0</version>
9296
<configuration>
93-
<release>11</release>
97+
<release>17</release>
9498
</configuration>
9599
</plugin>
96100
<plugin>
@@ -145,7 +149,7 @@
145149
</executions>
146150
<configuration>
147151
<quiet>true</quiet>
148-
<release>11</release>
152+
<release>${project.jdk.version}</release>
149153
<tags>
150154
<!-- workaround for "unknown tag: implNote", see https://blog.codefx.org/java/new-javadoc-tags/#Maven -->
151155
<tag>
@@ -192,6 +196,33 @@
192196

193197

194198
<profiles>
199+
<profile>
200+
<id>dependency-check</id>
201+
<build>
202+
<plugins>
203+
<plugin>
204+
<groupId>org.owasp</groupId>
205+
<artifactId>dependency-check-maven</artifactId>
206+
<version>${dependency-check.version}</version>
207+
<configuration>
208+
<cveValidForHours>24</cveValidForHours>
209+
<failBuildOnCVSS>0</failBuildOnCVSS>
210+
<skipTestScope>true</skipTestScope>
211+
<detail>true</detail>
212+
<suppressionFile>suppression.xml</suppressionFile>
213+
</configuration>
214+
<executions>
215+
<execution>
216+
<goals>
217+
<goal>check</goal>
218+
</goals>
219+
</execution>
220+
</executions>
221+
</plugin>
222+
</plugins>
223+
</build>
224+
</profile>
225+
195226
<profile>
196227
<id>sign</id>
197228
<build>
@@ -225,7 +256,7 @@
225256
<repository>
226257
<id>ossrh</id>
227258
<name>Maven Central</name>
228-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
259+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
229260
</repository>
230261
</distributionManagement>
231262
<build>
@@ -237,7 +268,7 @@
237268
<extensions>true</extensions>
238269
<configuration>
239270
<serverId>ossrh</serverId>
240-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
271+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
241272
<autoReleaseAfterClose>true</autoReleaseAfterClose>
242273
</configuration>
243274
</plugin>

src/main/java/org/cryptomator/linux/keychain/KDEWalletKeychainAccess.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.cryptomator.linux.keychain;
22

33
import com.google.common.base.Preconditions;
4+
import org.cryptomator.integrations.common.OperatingSystem;
5+
import org.cryptomator.integrations.common.Priority;
46
import org.cryptomator.integrations.keychain.KeychainAccessException;
57
import org.cryptomator.integrations.keychain.KeychainAccessProvider;
68
import org.freedesktop.dbus.connections.impl.DBusConnection;
@@ -14,6 +16,8 @@
1416

1517
import java.util.Optional;
1618

19+
@Priority(900)
20+
@OperatingSystem(OperatingSystem.Value.LINUX)
1721
public class KDEWalletKeychainAccess implements KeychainAccessProvider {
1822

1923
private static final Logger LOG = LoggerFactory.getLogger(KDEWalletKeychainAccess.class);
@@ -42,7 +46,7 @@ public boolean isLocked() {
4246
}
4347

4448
@Override
45-
public void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
49+
public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
4650
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
4751
wallet.get().storePassphrase(key, passphrase);
4852
}
@@ -60,7 +64,7 @@ public void deletePassphrase(String key) throws KeychainAccessException {
6064
}
6165

6266
@Override
63-
public void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
67+
public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
6468
Preconditions.checkState(wallet.isPresent(), "Keychain not supported.");
6569
wallet.get().changePassphrase(key, passphrase);
6670
}

src/main/java/org/cryptomator/linux/keychain/SecretServiceKeychainAccess.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
package org.cryptomator.linux.keychain;
22

3+
import org.cryptomator.integrations.common.OperatingSystem;
4+
import org.cryptomator.integrations.common.Priority;
35
import org.cryptomator.integrations.keychain.KeychainAccessException;
46
import org.cryptomator.integrations.keychain.KeychainAccessProvider;
57
import org.freedesktop.secret.simple.SimpleCollection;
68

79
import java.io.IOException;
8-
import java.security.AccessControlException;
910
import java.util.List;
1011
import java.util.Map;
1112

13+
@Priority(900)
14+
@OperatingSystem(OperatingSystem.Value.LINUX)
1215
public class SecretServiceKeychainAccess implements KeychainAccessProvider {
1316

1417
private final String LABEL_FOR_SECRET_IN_KEYRING = "Cryptomator";
@@ -33,15 +36,15 @@ public boolean isLocked() {
3336
}
3437

3538
@Override
36-
public void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
39+
public void storePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
3740
try (SimpleCollection keyring = new SimpleCollection()) {
3841
List<String> list = keyring.getItems(createAttributes(key));
3942
if (list == null || list.isEmpty()) {
4043
keyring.createItem(LABEL_FOR_SECRET_IN_KEYRING, passphrase, createAttributes(key));
4144
} else {
42-
changePassphrase(key, passphrase);
45+
changePassphrase(key, displayName, passphrase);
4346
}
44-
} catch (IOException | AccessControlException e) {
47+
} catch (IOException | SecurityException e) {
4548
throw new KeychainAccessException("Storing password failed.", e);
4649
}
4750
}
@@ -55,7 +58,7 @@ public char[] loadPassphrase(String key) throws KeychainAccessException {
5558
} else {
5659
return null;
5760
}
58-
} catch (IOException | AccessControlException e) {
61+
} catch (IOException | SecurityException e) {
5962
throw new KeychainAccessException("Loading password failed.", e);
6063
}
6164
}
@@ -67,19 +70,19 @@ public void deletePassphrase(String key) throws KeychainAccessException {
6770
if (list != null && !list.isEmpty()) {
6871
keyring.deleteItem(list.get(0));
6972
}
70-
} catch (IOException | AccessControlException e) {
73+
} catch (IOException | SecurityException e) {
7174
throw new KeychainAccessException("Deleting password failed.", e);
7275
}
7376
}
7477

7578
@Override
76-
public void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
79+
public void changePassphrase(String key, String displayName, CharSequence passphrase) throws KeychainAccessException {
7780
try (SimpleCollection keyring = new SimpleCollection()) {
7881
List<String> list = keyring.getItems(createAttributes(key));
7982
if (list != null && !list.isEmpty()) {
8083
keyring.updateItem(list.get(0), LABEL_FOR_SECRET_IN_KEYRING, passphrase, createAttributes(key));
8184
}
82-
} catch (IOException | AccessControlException e) {
85+
} catch (IOException | SecurityException e) {
8386
throw new KeychainAccessException("Changing password failed.", e);
8487
}
8588
}

suppression.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
3+
<suppress>
4+
<notes><![CDATA[
5+
Incorrectly matched CPE, see https://github.com/jeremylong/DependencyCheck/issues/4177git
6+
]]></notes>
7+
<gav regex="true">^org\.cryptomator:.*$</gav>
8+
<cpe>cpe:/a:cryptomator:cryptomator</cpe>
9+
<cve>CVE-2022-25366</cve>
10+
</suppress>
11+
<suppress>
12+
<notes><![CDATA[
13+
False postive, because secret-service only accesses the external gnome-keyring service
14+
]]></notes>
15+
<gav regex="true">^de\.swiesend\:secret\-service:.*$</gav>
16+
<cve>CVE-2018-19358</cve>
17+
<cve>CVE-2018-20781</cve>
18+
</suppress>
19+
</suppressions>

0 commit comments

Comments
 (0)