Skip to content

Commit 81b2ee7

Browse files
committed
Merge branch 'release/1.4.1'
2 parents f35693c + 6a5b909 commit 81b2ee7

File tree

6 files changed

+90
-19
lines changed

6 files changed

+90
-19
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
if: startsWith(github.ref, 'refs/tags/')
1818
shell: bash
1919
run: |
20-
mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
20+
mvn -B versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
2121
- name: Build and Test
2222
id: buildAndTest
23-
run: mvn -B clean install -Pdependency-check
24-
- uses: actions/upload-artifact@v3
23+
run: mvn -B clean install
24+
- uses: actions/upload-artifact@v4
2525
with:
2626
name: artifacts
2727
path: target/*.jar

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
java-version: 21
2626
cache: 'maven'
2727
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@v2
28+
uses: github/codeql-action/init@v3
2929
with:
3030
languages: java
3131
- name: Build
3232
run: mvn -B compile
3333
- name: Perform CodeQL Analysis
34-
uses: github/codeql-action/analyze@v2
34+
uses: github/codeql-action/analyze@v3
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: OWASP Maven Dependency Check
2+
on:
3+
schedule:
4+
- cron: '0 11 * * 0'
5+
push:
6+
branches:
7+
- 'release/**'
8+
workflow_dispatch:
9+
10+
11+
jobs:
12+
check-dependencies:
13+
name: Check dependencies
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
show-progress: false
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: 21
24+
cache: 'maven'
25+
- name: Cache NVD DB
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.m2/repository/org/owasp/dependency-check-data/
29+
key: dependency-check-${{ github.run_id }}
30+
restore-keys: |
31+
dependency-check
32+
env:
33+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
34+
- name: Run org.owasp:dependency-check plugin
35+
id: dependency-check
36+
continue-on-error: true
37+
run: mvn -B validate -Pdependency-check
38+
env:
39+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
40+
- name: Upload report on failure
41+
if: steps.dependency-check.outcome == 'failure'
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: dependency-check-report
45+
path: target/dependency-check-report.html
46+
if-no-files-found: error
47+
- name: Slack Notification on regular check
48+
if: github.event_name == 'schedule' && steps.dependency-check.outcome == 'failure'
49+
uses: rtCamp/action-slack-notify@v2
50+
env:
51+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
52+
SLACK_USERNAME: 'Cryptobot'
53+
SLACK_ICON: false
54+
SLACK_ICON_EMOJI: ':bot:'
55+
SLACK_CHANNEL: 'cryptomator-desktop'
56+
SLACK_TITLE: "Vulnerabilities in ${{ github.event.repository.name }} detected."
57+
SLACK_MESSAGE: "Download the <https://github.com/${{ github.repository }}/actions/run/${{ github.run_id }}|report> for more details."
58+
SLACK_FOOTER: false
59+
MSG_MINIMAL: true
60+
- name: Failing workflow on release branch
61+
if: github.event_name == 'push' && steps.dependency-check.outcome == 'failure'
62+
shell: bash
63+
run: exit 1

pom.xml

Lines changed: 9 additions & 7 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.4.0</version>
8+
<version>1.4.1</version>
99

1010
<name>integrations-linux</name>
1111
<description>Provides optional Linux services used by Cryptomator</description>
@@ -44,13 +44,13 @@
4444
<secret-service.version>2.0.0-alpha</secret-service.version>
4545
<kdewallet.version>1.3.3</kdewallet.version>
4646
<appindicator.version>1.3.6</appindicator.version>
47-
<slf4j.version>2.0.9</slf4j.version>
47+
<slf4j.version>2.0.11</slf4j.version>
4848

4949
<!-- test dependencies -->
5050
<junit.version>5.10.1</junit.version>
5151

5252
<!-- build plugin dependencies -->
53-
<dependency-check.version>8.4.2</dependency-check.version>
53+
<dependency-check.version>9.0.7</dependency-check.version>
5454
<nexus-staging.version>1.6.8</nexus-staging.version>
5555
</properties>
5656

@@ -94,7 +94,7 @@
9494
<plugin>
9595
<groupId>org.apache.maven.plugins</groupId>
9696
<artifactId>maven-compiler-plugin</artifactId>
97-
<version>3.11.0</version>
97+
<version>3.12.1</version>
9898
<configuration>
9999
<release>${project.jdk.version}</release>
100100
<compilerArgs>
@@ -105,7 +105,7 @@
105105
<plugin>
106106
<groupId>org.apache.maven.plugins</groupId>
107107
<artifactId>maven-surefire-plugin</artifactId>
108-
<version>3.2.1</version>
108+
<version>3.2.3</version>
109109
</plugin>
110110
<plugin>
111111
<groupId>org.apache.maven.plugins</groupId>
@@ -143,7 +143,7 @@
143143
</plugin>
144144
<plugin>
145145
<artifactId>maven-javadoc-plugin</artifactId>
146-
<version>3.6.0</version>
146+
<version>3.6.3</version>
147147
<executions>
148148
<execution>
149149
<id>attach-javadocs</id>
@@ -211,17 +211,19 @@
211211
<artifactId>dependency-check-maven</artifactId>
212212
<version>${dependency-check.version}</version>
213213
<configuration>
214-
<cveValidForHours>24</cveValidForHours>
214+
<nvdValidForHours>24</nvdValidForHours>
215215
<failBuildOnCVSS>0</failBuildOnCVSS>
216216
<skipTestScope>true</skipTestScope>
217217
<detail>true</detail>
218218
<suppressionFile>suppression.xml</suppressionFile>
219+
<nvdApiKey>${env.NVD_API_KEY}</nvdApiKey>
219220
</configuration>
220221
<executions>
221222
<execution>
222223
<goals>
223224
<goal>check</goal>
224225
</goals>
226+
<phase>validate</phase>
225227
</execution>
226228
</executions>
227229
</plugin>

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import org.cryptomator.integrations.common.Priority;
66
import org.cryptomator.integrations.keychain.KeychainAccessException;
77
import org.cryptomator.integrations.keychain.KeychainAccessProvider;
8-
import org.freedesktop.dbus.exceptions.DBusExecutionException;
8+
import org.slf4j.Logger;
9+
import org.slf4j.LoggerFactory;
910

1011
import java.io.IOException;
1112
import java.util.List;
@@ -15,6 +16,8 @@
1516
@OperatingSystem(OperatingSystem.Value.LINUX)
1617
public class SecretServiceKeychainAccess implements KeychainAccessProvider {
1718

19+
private static Logger LOG = LoggerFactory.getLogger(SecretServiceKeychainAccess.class);
20+
1821
private final String LABEL_FOR_SECRET_IN_KEYRING = "Cryptomator";
1922

2023
@Override
@@ -27,12 +30,8 @@ public boolean isSupported() {
2730
try {
2831
return SimpleCollection.isAvailable();
2932
} catch (ExceptionInInitializerError e) {
30-
//TODO: remove try-catch once secret-service lib is fixed
31-
if(e.getException() instanceof DBusExecutionException) {
32-
return false;
33-
} else {
34-
throw e;
35-
}
33+
LOG.warn("Initializing secret service keychain access failed", e.getException());
34+
return false;
3635
}
3736
}
3837

src/test/java/org/cryptomator/linux/keychain/KDEWalletKeychainAccessTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.junit.jupiter.api.Assertions;
44
import org.junit.jupiter.api.BeforeAll;
55
import org.junit.jupiter.api.Test;
6+
import org.junit.jupiter.api.condition.EnabledIf;
67
import org.junit.jupiter.api.condition.EnabledOnOs;
78
import org.junit.jupiter.api.condition.OS;
89

@@ -14,6 +15,7 @@
1415
* Unit tests for KWallet access via DBUS.
1516
*/
1617
@EnabledOnOs(OS.LINUX)
18+
@EnabledIf("osEnvironmentSuitable")
1719
public class KDEWalletKeychainAccessTest {
1820

1921
private static boolean isInstalled;
@@ -40,4 +42,9 @@ public void testIsSupported() {
4042
KDEWalletKeychainAccess keychainAccess = new KDEWalletKeychainAccess();
4143
Assertions.assertEquals(isInstalled, keychainAccess.isSupported());
4244
}
45+
46+
47+
private static boolean osEnvironmentSuitable() {
48+
return System.getenv().containsKey("DISPLAY");
49+
}
4350
}

0 commit comments

Comments
 (0)