Skip to content

Commit

Permalink
Merge branch 'release/1.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Feb 5, 2024
2 parents bc943e3 + 8eb8c38 commit e1adc54
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 27 deletions.
27 changes: 22 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,31 @@ updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
timezone: "UTC"
interval: "monthly"
groups:
maven-dependencies:
java-test-dependencies:
patterns:
- "org.junit.jupiter:*"
- "org.mockito:*"
- "org.hamcrest:*"
maven-build-plugins:
patterns:
- "org.apache.maven.plugins:*"
- "org.jacoco:jacoco-maven-plugin"
- "org.owasp:dependency-check-maven"
- "org.sonatype.plugins:nexus-staging-maven-plugin"
java-production-dependencies:
patterns:
- "*"
exclude-patterns:
- "org.apache.maven.plugins:*"
- "org.jacoco:jacoco-maven-plugin"
- "org.owasp:dependency-check-maven"
- "org.sonatype.plugins:nexus-staging-maven-plugin"
- "org.junit.jupiter:*"
- "org.mockito:*"
- "org.hamcrest:*"


- package-ecosystem: "github-actions"
directory: "/" # even for `.github/workflows`
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@ 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@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Ensure to use tagged version
if: startsWith(github.ref, 'refs/tags/')
run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
run: mvn -B versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
- name: Build and Test
id: buildAndTest
run: mvn -B clean install jacoco:report -Pcoverage,dependency-check
- uses: actions/upload-artifact@v3
run: mvn -B clean install jacoco:report -Pcoverage
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: target/*.jar
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: OWASP Maven Dependency Check
on:
schedule:
- cron: '0 15 * * 0'
push:
branches:
- 'release/**'
workflow_dispatch:


jobs:
check-dependencies:
name: Check dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
cache: 'maven'
- name: Cache NVD DB
uses: actions/cache@v4
with:
path: ~/.m2/repository/org/owasp/dependency-check-data/
key: dependency-check-${{ github.run_id }}
restore-keys: |
dependency-check
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
- name: Run org.owasp:dependency-check plugin
id: dependency-check
continue-on-error: true
run: mvn -B validate -Pdependency-check
env:
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
- name: Upload report on failure
if: steps.dependency-check.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: dependency-check-report
path: target/dependency-check-report.html
if-no-files-found: error
- name: Slack Notification on regular check
if: github.event_name == 'schedule' && steps.dependency-check.outcome == 'failure'
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_USERNAME: 'Cryptobot'
SLACK_ICON: false
SLACK_ICON_EMOJI: ':bot:'
SLACK_CHANNEL: 'cryptomator-desktop'
SLACK_TITLE: "Vulnerabilities in ${{ github.event.repository.name }} detected."
SLACK_MESSAGE: "Download the <https://github.com/${{ github.repository }}/actions/run/${{ github.run_id }}|report> for more details."
SLACK_FOOTER: false
MSG_MINIMAL: true
- name: Failing workflow on release branch
if: github.event_name == 'push' && steps.dependency-check.outcome == 'failure'
shell: bash
run: exit 1
4 changes: 2 additions & 2 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- 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: 21
distribution: 'temurin'
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 11
java-version: 21
distribution: 'temurin'
cache: 'maven'
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
Expand Down
31 changes: 19 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>webdav-nio-adapter-servlet</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
<name>WebDAV-NIO Adapter Servlet</name>
<description>Servlet serving NIO directory contents as WebDAV resources.</description>
<url>https://github.com/cryptomator/webdav-nio-adapter-servlet</url>
Expand All @@ -19,14 +19,17 @@

<!-- dependencies -->
<servlet.version>4.0.1</servlet.version>
<jackrabbit.version>2.21.19</jackrabbit.version>
<guava.version>32.1.2-jre</guava.version>
<slf4j.version>2.0.9</slf4j.version>
<jackrabbit.version>2.21.22</jackrabbit.version>
<guava.version>33.0.0-jre</guava.version>
<slf4j.version>2.0.11</slf4j.version>

<!-- test dependencies -->
<junit.jupiter.version>5.10.0</junit.jupiter.version>
<mockito.version>5.5.0</mockito.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<mockito.version>5.10.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>

<!-- mvn plugins -->
<dependency-check.version>9.0.9</dependency-check.version>
</properties>

<licenses>
Expand Down Expand Up @@ -120,15 +123,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.12.1</version>
<configuration>
<release>11</release>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -156,7 +159,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -177,16 +180,20 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>8.4.0</version>
<version>${dependency-check.version}</version>
<configuration>
<cveValidForHours>24</cveValidForHours>
<nvdValidForHours>24</nvdValidForHours>
<failBuildOnCVSS>6</failBuildOnCVSS>
<skipTestScope>true</skipTestScope>
<detail>true</detail>
<nvdApiKey>${env.NVD_API_KEY}</nvdApiKey>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
Expand All @@ -201,7 +208,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down

0 comments on commit e1adc54

Please sign in to comment.