Skip to content

Commit 525e3b6

Browse files
committed
CI: add Dependabot, JDK matrix and OpenSSF Scorecard
- dependabot.yml: weekly updates for maven deps and github-actions (keeps the SHA-pinned actions fresh), non-major maven bumps grouped to reduce noise. - build.yml: run the test suite across a JDK matrix (17, 21). - scorecard.yml: OpenSSF Scorecard supply-chain analysis, results uploaded to code scanning. All actions pinned to commit SHAs.
1 parent 4609721 commit 525e3b6

3 files changed

Lines changed: 80 additions & 2 deletions

File tree

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
# Maven runtime/test dependencies (okhttp, gson, java-jwt, kotlin-stdlib, ...)
4+
- package-ecosystem: maven
5+
directory: "/"
6+
schedule:
7+
interval: weekly
8+
open-pull-requests-limit: 10
9+
groups:
10+
# Bundle non-major bumps into a single PR to cut noise.
11+
maven-minor-patch:
12+
update-types:
13+
- minor
14+
- patch
15+
16+
# Keep the SHA-pinned GitHub Actions fresh (the pins go stale otherwise).
17+
- package-ecosystem: github-actions
18+
directory: "/"
19+
schedule:
20+
interval: weekly
21+
groups:
22+
github-actions:
23+
patterns:
24+
- "*"

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,22 @@ permissions:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# LTS JVMs the library is consumed on (e.g. Keycloak runs on 17/21).
21+
java-version: [ '17', '21' ]
1722

1823
steps:
1924
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2025
with:
2126
persist-credentials: false
2227

23-
- name: Set up JDK
28+
- name: Set up JDK ${{ matrix.java-version }}
2429
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
2530
with:
2631
distribution: temurin
27-
java-version: '17'
32+
java-version: ${{ matrix.java-version }}
2833
cache: maven
2934

3035
# 'verify' runs the unit tests (surefire) before packaging. Tests run by

.github/workflows/scorecard.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# OpenSSF Scorecard: assesses the repository's supply-chain security posture
2+
# (branch protection, token permissions, pinned dependencies, etc.).
3+
# Results appear under the repository's "Security > Code scanning" tab.
4+
5+
name: Scorecard
6+
7+
on:
8+
branch_protection_rule:
9+
push:
10+
branches: [ "master" ]
11+
schedule:
12+
- cron: '23 4 * * 1'
13+
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: Scorecard analysis
19+
runs-on: ubuntu-latest
20+
permissions:
21+
security-events: write
22+
# Needed to publish results and get a badge (OpenSSF API, OIDC token).
23+
id-token: write
24+
25+
steps:
26+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
27+
with:
28+
persist-credentials: false
29+
30+
- name: Run analysis
31+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
32+
with:
33+
results_file: results.sarif
34+
results_format: sarif
35+
publish_results: true
36+
37+
# Keep the raw SARIF as an artifact for inspection.
38+
- name: Upload artifact
39+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
40+
with:
41+
name: scorecard-results
42+
path: results.sarif
43+
retention-days: 5
44+
45+
- name: Upload to code scanning
46+
uses: github/codeql-action/upload-sarif@dd903d2e4f5405488e5ef1422510ee31c8b32357 # v3
47+
with:
48+
sarif_file: results.sarif
49+
category: scorecard

0 commit comments

Comments
 (0)