Skip to content

Commit 49a4f4c

Browse files
authored
Merge branch 'main' into dependabot/maven/org.assertj-assertj-core-3.27.2
2 parents 941b711 + 394ab0c commit 49a4f4c

File tree

52 files changed

+2585
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2585
-56
lines changed

.github/workflows/build-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
- 'mkdocs.yml'
1919
- 'Makefile'
2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
docs:
2326
runs-on: ubuntu-latest

.github/workflows/dispatch_analytics.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ on:
77
- cron: '0 * * * *'
88

99
permissions:
10-
id-token: write
11-
actions: read
12-
checks: read
1310
contents: read
14-
deployments: read
15-
issues: read
16-
discussions: read
17-
packages: read
18-
pages: read
19-
pull-requests: read
20-
repository-projects: read
21-
security-events: read
22-
statuses: read
2311

2412
jobs:
2513
dispatch_token:
14+
permissions:
15+
id-token: write
16+
actions: read
17+
checks: read
18+
deployments: read
19+
issues: read
20+
discussions: read
21+
packages: read
22+
pages: read
23+
pull-requests: read
24+
repository-projects: read
25+
security-events: read
26+
statuses: read
2627
concurrency:
2728
group: analytics
2829
runs-on: ubuntu-latest

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
workflow_dispatch: {}
88

99
permissions:
10-
id-token: write
11-
contents: write
12-
pages: write
10+
contents: read
1311

1412
jobs:
1513
docs:
1614
runs-on: ubuntu-latest
1715
environment: Docs
16+
permissions:
17+
id-token: write
1818
steps:
1919
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
2020
- name: Set up Python
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Scorecard supply-chain security
2+
on:
3+
# For Branch-Protection check. Only the default branch is supported. See
4+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5+
branch_protection_rule:
6+
schedule:
7+
- cron: "0 9 * * *"
8+
push:
9+
branches: [main]
10+
workflow_dispatch:
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analysis:
16+
name: Scorecard analysis
17+
runs-on: ubuntu-latest
18+
# environment: scorecard
19+
permissions:
20+
security-events: write # update code-scanning dashboard
21+
id-token: write # confirm org+repo identity before publish results
22+
23+
steps:
24+
- name: "Checkout code"
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- name: "Run analysis"
30+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
31+
with:
32+
results_file: results.sarif
33+
results_format: sarif
34+
publish_results: true # publish to OSSF Scorecard REST API
35+
# repo_token: ${{ secrets.SCORECARD_TOKEN }} # read-only fine-grained token to read branch protection settings
36+
37+
- name: "Upload results"
38+
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
39+
with:
40+
name: SARIF file
41+
path: results.sarif
42+
retention-days: 5
43+
44+
# Upload the results to GitHub's code scanning dashboard.
45+
- name: "Upload to code-scanning"
46+
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
47+
with:
48+
sarif_file: results.sarif

.github/workflows/osv.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: OSV-Scanner
2+
3+
# Change "main" to your default branch if you use a different name, i.e. "master"
4+
on:
5+
pull_request:
6+
branches: [main]
7+
merge_group:
8+
branches: [main]
9+
workflow_dispatch: {}
10+
11+
schedule:
12+
- cron: "30 12 * * 1"
13+
# Change "main" to your default branch if you use a different name, i.e. "master"
14+
push:
15+
branches: [main]
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
scan-pr:
22+
permissions:
23+
actions: read
24+
contents: read
25+
security-events: write
26+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@764c91816374ff2d8fc2095dab36eecd42d61638"

.github/workflows/pr_artifacts_size.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- 'powertools-validation/**'
2424
- 'pom.xml'
2525
- '.github/workflows/pr_artifacts_size.yml'
26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
codecheck:
2832
runs-on: ubuntu-latest

.github/workflows/pr_build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ on:
4545
- 'pom.xml'
4646
- 'examples/pom.xml'
4747
- '.github/workflows/**'
48+
49+
permissions:
50+
contents: read
51+
4852
jobs:
4953
build-corretto:
5054
runs-on: ubuntu-latest
@@ -58,7 +62,6 @@ jobs:
5862
AWS_REGION: eu-west-1
5963
permissions:
6064
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
61-
contents: read
6265
steps:
6366
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
6467
- name: Setup java
@@ -69,14 +72,30 @@ jobs:
6972
cache: 'maven'
7073
- name: Build with Maven
7174
run: mvn -B install --file pom.xml
75+
- name: Build Gradle Setup
76+
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
77+
working-directory: examples/powertools-examples-core/gradle
78+
run: |
79+
curl -L -o gradle/wrapper/gradle.zip https:$(cat gradle/wrapper/gradle-wrapper.properties | grep distributionUrl | cut -d ':' -f 2)
80+
unzip gradle/wrapper/gradle.zip -d gradle/wrapper/gradle
81+
./gradle/wrapper/gradle/gradle-8.2.1/bin/gradle wrapper
7282
- name: Build Gradle Example - Java
7383
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
7484
working-directory: examples/powertools-examples-core/gradle
7585
run: ./gradlew build
86+
87+
- name: Build Gradle Setup (Kotlin)
88+
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
89+
working-directory: examples/powertools-examples-core/kotlin
90+
run: |
91+
curl -L -o gradle/wrapper/gradle.zip https:$(cat gradle/wrapper/gradle-wrapper.properties | grep distributionUrl | cut -d ':' -f 2)
92+
unzip gradle/wrapper/gradle.zip -d gradle/wrapper/gradle
93+
./gradle/wrapper/gradle/gradle-8.2.1/bin/gradle wrapper
7694
- name: Build Gradle Example - Kotlin
7795
if: ${{ matrix.java == '8' }} # Gradle example can only be built on Java 8
7896
working-directory: examples/powertools-examples-core/kotlin
7997
run: ./gradlew build
98+
8099
- name: Upload coverage to Codecov
81100
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
82101
if: ${{ matrix.java == '11' }} # publish results once

.github/workflows/pr_build_v2.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ on:
4141
- 'pom.xml'
4242
- 'examples/pom.xml'
4343
- '.github/workflows/**'
44+
45+
permissions:
46+
contents: read
47+
4448
jobs:
4549
build-corretto:
4650
runs-on: ubuntu-latest
@@ -54,7 +58,6 @@ jobs:
5458
AWS_REGION: eu-west-1
5559
permissions:
5660
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
57-
contents: read
5861
steps:
5962
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
6063
- name: Setup java

.github/workflows/pr_iac_lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- v2
1212
paths:
1313
- 'examples/**'
14+
15+
permissions:
16+
contents: read
17+
1418
jobs:
1519
linter:
1620
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ on:
44
types:
55
- published
66
workflow_dispatch: {}
7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
14+
environment: Release
15+
permissions:
16+
id-token: write
17+
issues: write
18+
contents: write
1019
steps:
1120
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
1221
- name: Set up Maven Central Repository

0 commit comments

Comments
 (0)